You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked the branches or the maintainer's PRs for upcoming bug fixes.
Affected Modules
Command
Description
Context menus can contain uppercase characters in their name, and when they are registered (using CommandClient#addContextMenu) in contextMenuIndex from CommandClientImpl the index is associated with the menu name, exactly as it is in the field (uppercased). However CommandClientImpl#onMessageContextMenu tries to get the index associated with the command name, lowercased, and such the command cannot be found if it contains uppercase characters.
Possible ways of fixing
Get rid of the toLowercase call when the command is searched. This fix is preferred, as there could be 2 menus with the same name, but different cases
Make addContextMenu lowercase the command name when inserting it in the map.
The text was updated successfully, but these errors were encountered:
I'm not sure how Discord handles case sensitivity. If it allows "rory" and "Rory" as valid names then we should do the former. Should probably get rid of the checks altogether since you could have a message and user context menu with the same name and be fine.
Issue Checklist
Affected Modules
Command
Description
Context menus can contain uppercase characters in their name, and when they are registered (using
CommandClient#addContextMenu
) incontextMenuIndex
fromCommandClientImpl
the index is associated with the menu name, exactly as it is in the field (uppercased). HoweverCommandClientImpl#onMessageContextMenu
tries to get the index associated with the command name, lowercased, and such the command cannot be found if it contains uppercase characters.Possible ways of fixing
toLowercase
call when the command is searched. This fix is preferred, as there could be 2 menus with the same name, but different casesaddContextMenu
lowercase the command name when inserting it in the map.The text was updated successfully, but these errors were encountered: