Coder Social home page Coder Social logo

wheelercj / parhelion Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 2.88 MB

A general-purpose Discord bot that can send reminders, help answer FAQs, translate between many different languages, solve math questions, run code in almost any language, and more.

License: MIT License

Python 99.96% Dockerfile 0.04%
assistant bot discord discord-bot discord-py docker python

parhelion's Issues

Duplicate log messages

Sometimes, messages are logged multiple times.

Example:

2023-12-16 07:38:31[INFO]Loading . . .
2023-12-16 07:39:00[INFO][author chris__________][guild None][command remind]
2023-12-16 07:55:01[INFO][author chris__________][guild None][command /remind list]
2023-12-16 07:55:10[INFO][author chris__________][guild None][command /remind delete]
2023-12-17 20:38:51[INFO]Loading . . .
2023-12-17 20:38:51[INFO]Loading . . .
2023-12-18 05:03:03[INFO][author chris__________][guild None][command /timestamp]
2023-12-18 05:03:03[INFO][author chris__________][guild None][command /timestamp]
2023-12-18 05:03:56[INFO][author chris__________][guild None][command /timestamp]
2023-12-18 05:03:56[INFO][author chris__________][guild None][command /timestamp]
2023-12-20 06:43:21[INFO][author chris__________][guild None][command /translate to]
2023-12-20 06:43:21[INFO][author chris__________][guild None][command /translate to]
2023-12-20 10:09:59[INFO]Loading . . .
2023-12-20 10:09:59[INFO]Loading . . .
2023-12-20 10:09:59[INFO]Loading . . .
2023-12-21 06:49:51[INFO][author chris__________][guild None][command /timestamp]
2023-12-21 06:49:51[INFO][author chris__________][guild None][command /timestamp]
2023-12-21 06:49:51[INFO][author chris__________][guild None][command /timestamp]
2023-12-21 06:50:14[INFO][author chris__________][guild None][command /timestamp]
2023-12-21 06:50:14[INFO][author chris__________][guild None][command /timestamp]
2023-12-21 06:50:14[INFO][author chris__________][guild None][command /timestamp]

Notice the time of each line. Some lines have the same time as other lines, which doesn't make sense since all commands here were from one person, unless individual events are being logged multiple times.

The patterns in the log files suggest that when the bot reconnects, the logger is sometimes recreated but doesn't actually replace the existing logger even though the variable is overwritten.

It appears the discord.py documentation has changed slightly since I last read about on_connect. It now says that the warnings from on_ready also apply; that is, the on_connect function may be called multiple times during a single run of the bot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.