nerdland-unofficial-fans / nerdlandbot

Nerdland discord bot
MIT License
18 stars 4 forks source link

Anyone can use the "set_mod_channel" command #214

Open Autom3 opened 3 years ago

Autom3 commented 3 years ago

Describe the bug The check to see if someone is in fact a bot admin is done incorrectly

To Reproduce Steps to reproduce the behavior:

  1. Open this link
  2. As a non-bot admin, type !mod_channel in #botplayground
  3. See that this error does not get printed

Expected behavior The error should be printed and the code should terminate at that line

Additional context The check currently checks if the function exists, rather than executing the function.

The faulty code has been copied by this pull request. So the issue needs to be fixed there as well.