PEP in utils

This commit is contained in:
Nikolaj
2021-06-16 14:12:21 +02:00
parent 8c253aca3d
commit b68d62cf6c
137 changed files with 1159 additions and 1251 deletions

View File

@ -91,7 +91,7 @@ The `Command` methods in cogs should only exist to perform small tasks or call c
### Folders
+ `cogs/` contains the command cogs.
+ `funcs/` contains all functions and classes called on to perform commands. All functions must be accessible through a class, of which the `Gwendolyn` class has an instance as an attribute.
+ `resources/` contains the images, lookup databases, fonts etc. that the rest of the code uses.
+ `gwendolyn/resources/` contains the images, lookup databases, fonts etc. that the rest of the code uses.
### Important files
+ `Gwendolyn.py` contains the Gwendolyn class and running it starts the bot. It should be lightweight and not more than 100 lines.
@ -108,6 +108,6 @@ Things you should know about the logging:
+ Logs of level `ERROR` should only be created in the `on_command_error()`, `on_error()` or `Command.error()` functions.
### Logging rules
1. Never call the `logThis()` function from `/utils/utilFuncs/`. Always call `bot.log`.
1. Never call the `log_this()` function from `/utils/utilFuncs/`. Always call `bot.log`.
1. The `on_slash_command()` and `on_ready()` events are the only times log should be called at level 25. `INFO` level logs should be used for all other logging.
1. Always provide the channel id if available. Although you shouldn't pass the channel id to a function purely to use it in logs.