You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I was getting myself acquainted with cogwatch (and Cogs themselves), unfortunately, I lost quite some time dealing with extension-related errors upon trying to reload a cog file; until finding out I needed to add the following function at the bottom of it:
defsetup(bot: commands.Bot):
'''Add cog every time extension (module) is (re)loaded.'''bot.add_cog(MyCog(bot))
However, there is no explicit reference to the Extension concept in cogwatch tutorial, even though discord.py extensions page mentions hot-reloading. Since it seems to be a lower-level concept that many users that arrive here aren't aware of (myself included), I think it might be interesting to add tutorial instructions regarding these points (especially the needed setup function). 🙂
The text was updated successfully, but these errors were encountered:
* Add example command / cog file. (#9)
* Added poetry script for running the subclassed bot.
* Added example runner script for testing.
* Fixed bug after moving logging out to init file.
As I was getting myself acquainted with cogwatch (and Cogs themselves), unfortunately, I lost quite some time dealing with extension-related errors upon trying to reload a cog file; until finding out I needed to add the following function at the bottom of it:
However, there is no explicit reference to the Extension concept in cogwatch tutorial, even though discord.py extensions page mentions hot-reloading. Since it seems to be a lower-level concept that many users that arrive here aren't aware of (myself included), I think it might be interesting to add tutorial instructions regarding these points (especially the needed
setup
function). 🙂The text was updated successfully, but these errors were encountered: