LakeYS / Discord-Trivia-Bot

TriviaBot: Play trivia in Discord! Powered by discord.js and OpenTDB, with 24 categories and three modes of play.
http://lakeys.net/triviabot/
Apache License 2.0
84 stars 39 forks source link

Admin check stops working until reset #204

Closed LakeYS closed 3 years ago

LakeYS commented 3 years ago

Admin command check appears to stop functioning until the corresponding shard is reset. Users have reported the trivia stop command failing to recognize them as an admin.

This has been narrowed to some failing of the checks, msg.member !== null or msg.member.permissions.has("MANAGE_GUILD")) https://github.com/LakeYS/Discord-Trivia-Bot/blob/master/triviabot.js#L1223

First step would probably be to refactor this bit of code so it is more manageable--then investigate the permissions calls individually.

Will update if there are further reports, but as-is, this appears to be a relatively rare issue.

LakeYS commented 3 years ago

No-longer able to reproduce after several months.