super-cooper / memebot

A custom Discord bot For The Boys
GNU General Public License v3.0
8 stars 0 forks source link

Roles are case-sensitive #125

Closed super-cooper closed 2 years ago

super-cooper commented 2 years ago

Description We normalize roles by making them all lowercase, but once they've been created, referencing them requires the text to be all lowercase as well.

To Reproduce

  1. Create a new role in all caps (!role create ROLE)
  2. Reference the role as a tag (!role list @role) and observe it works
  3. Reference the role as the originally entered name (!role list ROLE) and observe that it fails

Expected behavior We normalize the roles so that capitalization doesn't matter. The role should be able to be referenced as ROLE, role, @role, so on

Screenshots N/A

Additional context Roles used to work this way when we manually wrote the logic to resolve them. After we switched to discord.py's command extension, it no longer has this facility. We could possibly resolve this with a simple custom converter for roles.