modmail-plugins
modmail-plugins copied to clipboard
Suggestions for claim.py
Here's some of the suggestions I have for the plugin at a first glance (mostly comments on the code itself, some on the commands and user experience):
- Formatting should conform to black as It's the formatting of choice for modmail (You could also use PEP 8: 3501/ E252 / E402).
- Add proper embeds instead of individual hardcoded text responses.
- Add settings for which commands to apply the checks to instead of hardcoding each one at the class constructor (iterating through them and applying the check progressively is an option).
- Modify check_reply to simplify mod replies since overridereply is redundant.
- Error handling for unknown threads using embeds or other logging.
- Simplify code (i.e return at send function)
- External / internal settings for the plugin would be appreciated (responses, commands, etc).
- (?) Functions can be made static / minor redundancies should be removed.
Small suggestions:
- Rename claimers -> owners (thread owner) since "claimers" sounds a bit weird.
Btw good job on the overall plugin (good use of the internal databasing).