Unknown-cogs

Discord Name: unknown.in

GitHub Repository (Must be V3): GitHub - Coltuna/unknown-cogs: my cogs for red bot

Description: A couple of cogs which I often finds useful for my community servers and I often feel could be useful for others too.

Thank you for your patience.

Commit hash: 72dead77a42b3c9474021680dd8ff814dc8e7282
Red v3.5.20
Consider only bullets prefixed with :memo: to be required.

General

  • :memo: Your repo should have a readme file with basic installation instructions.

Decancer

  • :memo: The cog does not check if the bot has add_reactions permissions prior to attempting to add reactions in [p]dehoist
  • :memo: [p]decancerset showsettings errors if the bot does not have embed_links permissions.
  • Instead of having a custom config value and system for making modlogs, consider properly hooking into the modlog api with a custom casetype.
  • The install_msg in your info.json seems to have a typo in the cog name.
  • The docstrings of your commands should not list the context object / return value, since the docstring is presented as help text to the user.
  • It is unclear from the help text what the difference between [p]decancer and [p]dehoist is. Should this be an alias instead?
    • It seems like the difference is whether the target is a member or a role, either a clearer command name or a typing.Union parameter may be better.

SelfRole

  • :memo: /selfrole list errors if a previously configured selfrole no longer exists
    • Since roles which were removed cannot be passed to /selfroleset remove, this cannot be fixed by the guild owner once it happens
    Traceback (most recent call last):
      File "datapath\cogs\CogManager\cogs\selfrole\main.py", line 124, in selfroleset_list
        formatted_selfroles = "\n".join(["+ " + r.name for r in roles])
    AttributeError: 'NoneType' object has no attribute 'name'
    
  • The command hint when a dangerous role is added uses a backslash instead of a forward slash.
  • Using checks instead of default_permission causes the management commands to appear for users who are unable to use the commands. Since the command name is similar to the command name for users, this may make it harder for users to not accidentally use the wrong command.
    • Generally it is a better idea to use text commands for management commands since only a small number of users will need to use these commands but they still contribute to the 100 slash command limit.