aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/fun/trivia_quiz.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2021-12-02 10:47:03 +0100
committerGravatar GitHub <[email protected]>2021-12-02 10:47:03 +0100
commit4852790221b88a9bb8dd4ed7a713caaafdbabf48 (patch)
tree84dc98070154ad7fa8eb51d270ebd1c0561dacad /bot/exts/fun/trivia_quiz.py
parentMerge pull request #950 from onerandomusername/patch-3 (diff)
parentMerge branch 'main' into update-role-constants (diff)
Merge pull request #900 from python-discord/update-role-constants
Update role constants
Diffstat (limited to 'bot/exts/fun/trivia_quiz.py')
-rw-r--r--bot/exts/fun/trivia_quiz.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/fun/trivia_quiz.py b/bot/exts/fun/trivia_quiz.py
index 712c8a12..4a1cec5b 100644
--- a/bot/exts/fun/trivia_quiz.py
+++ b/bot/exts/fun/trivia_quiz.py
@@ -16,7 +16,7 @@ from discord.ext import commands, tasks
from rapidfuzz import fuzz
from bot.bot import Bot
-from bot.constants import Client, Colours, NEGATIVE_REPLIES, Roles
+from bot.constants import Client, Colours, MODERATION_ROLES, NEGATIVE_REPLIES
logger = logging.getLogger(__name__)
@@ -550,7 +550,7 @@ class TriviaQuiz(commands.Cog):
if self.game_status[ctx.channel.id]:
# Check if the author is the game starter or a moderator.
if ctx.author == self.game_owners[ctx.channel.id] or any(
- Roles.moderator == role.id for role in ctx.author.roles
+ role.id in MODERATION_ROLES for role in getattr(ctx.author, 'roles', [])
):
self.game_status[ctx.channel.id] = False
del self.game_owners[ctx.channel.id]