modmail-plugins icon indicating copy to clipboard operation
modmail-plugins copied to clipboard

Suggestions for claim.py

Open CoalByte opened this issue 3 years ago • 0 comments

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).

CoalByte avatar Apr 26 '21 08:04 CoalByte