ItsDrike / CommandBot

Discord Bot which can handle most administrative tasks for servers.
Other
0 stars 0 forks source link

Refactor the !help command. #12

Closed ItsDrike closed 4 years ago

ItsDrike commented 4 years ago

Closes #11

There is a built-in way to get help from Discord.py This means instead of fully writing out our help function, we can simply use this new built-in way and build our system on top of it.

ItsDrike commented 4 years ago

This new edit to the embeds cog means that the embeds variable no longer needs to be global

# Global variable needed for the `has_active_embed` decorator to work
embeds = {}

embeds can now be a parameter and the new has_active_embed coroutine can be rewritten as a normal method instead of static method so that it will be able to read the no longer global embeds variable

ItsDrike commented 4 years ago

This new edit to the embeds cog means that the embeds variable no longer needs to be global

# Global variable needed for the `has_active_embed` decorator to work
embeds = {}

embeds can now be a parameter and the new has_active_embed coroutine can be rewritten as a normal method instead of static method so that it will be able to read the no longer global embeds variable

Fixed in 599683f038d6af043ae0c6ad9517da8e1c59d124