Closed SqueakyBeaver closed 3 years ago
Feel free to clean it up, the thing is that uh some of the code is copied over from R. danny so it's different, and different people contribute to the source.
Feel free to clean it up, the thing is that uh some of the code is copied over from R. danny so it's different, and different people contribute to the source.
Hey do you mind checking your email i have sent you a message :) or leave your discord tag/telegram id so i can add you?
When grepping the sources I only found one instance of .format
being used. And afaik that instance is unavoidable because the f""
way can't contain stuff with backslashes, which is in required in that instance to separate each item of a list into a new line (this line).
When it comes to has_role()
then the current implementation is shorter both to call and overall, which is why I think I'll keep it.
If no one mentions other things to clean up, I will declare the PR ready for merge.
I want to start off by saying that all of this is just a matter of preference and style.
I have noticed that not all code looks the same. For example, not the difference between the way the
_eval
andlmgtfy
functions are declared as commands. One uses the function name as the command name, while the other declares the name in the decorator. I propose that it be decided on which style to use and someone goes through the codebase and changes all of that.There also seems to be a difference between the way that strings are formatted. For example, this line uses
.format
, while this line and many others use f strings (f''
)I have also noticed that you use things like this if statement to determine whether a user can do something, when you can use a check like
@commands.has_role()
and even create your own check so that it is easier to readI also propose that all commands that you need special access to run be hidden. This has not been an issue yet, but some people are just stupid
I also noticed that a lot of commands are grouped in rules. It is not really a big deal and I get not wanting to have 20000 categories, but it would be nice if the category was named something like
general
.Overall, this bot is amazing 😁