-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENHANCEMENT] Use cogs for commands #46
Labels
Comments
I will open a pull request for this |
ColaIan
changed the title
Don't add commands in on_ready event
[ENHANCEMENT] Use cogs for commands
Sep 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Teapot.py/Teapot.py
Line 92 in f3ba3ff
Many commands and events in this project does not use cogs. Usage of cogs is recommended. And also don't load commands in on_ready event when you are not using cogs.
The
on_ready
event may be called multiple times during the execution of the bot. When called multiple times, errors are raised if you load commands inon_ready
event.The Discord API says,
This function is not guaranteed to be the first event called. Likewise, this function is not guaranteed to only be called once. This library implements reconnection logic and thus will end up calling this event whenever a RESUME request fails.
Note: You may need to rewrite large portions of this bot to fix this issue. Make sure to test everything works in your cogs before adding them to github.
Sources:
The text was updated successfully, but these errors were encountered: