KoalaBotUK / KoalaBot

🐨 All in one Discord bot for student societies & communities
https://KoalaBot.uk
MIT License
11 stars 8 forks source link

incorrectly capitalised and non-existent extensions can be enabled on 'koala-dev2' #399

Closed Gave2Haze closed 1 year ago

Gave2Haze commented 1 year ago

Describe the bug

incorrecTly capitaliSed eXtensions on 'koala-dev2' can be enabled despite them not existing, and doing so will prevent the correctly capitalised extension from being enabled. Additionally, the bot will not show an error message both when enabling the incorrect extension and failing to enable the correct one subsequently, as well as vice-versa.

To Reproduce

  1. Go to '#koala-dev2' in the 'Koala Bots' test server.
  2. Type in 'k!enableExt' followed by any incorrectly capitalised extension (e.g. 'twitchAlert').
  3. See error.

Expected behaviour

The non-existent extension should not be enabled, the bot should return an error.

Screenshots

227644077-67cd708d-fa50-425c-a8aa-f8a6c67f9aef See screenshot attached for the steps, as well as an example of the further errors detailed in the below section.

Additional context

Attempting to enable the correctly capitalised extension without disabling the incorrect extension will not enable the correct extension, however the bot will return the '[Extension] enabled' message while not listing the extension under the 'Enabled' list of the same message (see screenshot). The reverse is also true; attempting to enable the incorrect extension when the correct extension is already enabled will show the same message while still not enabling the incorrect extension. This issue does not occur with all incorrectly capitalised extension names due to some being real. 'announce', 'verify' and 'vote' are all real, so this issue will not occur with them. This has been tested on '#koala-alpha' and '#koala-public' with the correct 'NotImplementedError - testExt is not a valid extension' error message appearing.