aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/duck_game.py
diff options
context:
space:
mode:
authorGravatar Cam Caswell <[email protected]>2021-08-25 15:00:30 -0400
committerGravatar Cam Caswell <[email protected]>2021-08-25 15:00:30 -0400
commit812372b20062b6ce913f88a8c2e3d852c1758afa (patch)
treee678f9b7b78b6db22761099b61796aa8594b1611 /bot/exts/evergreen/duck_game.py
parentAdd more aliases (diff)
Use with_role decorator for stop command
Diffstat (limited to 'bot/exts/evergreen/duck_game.py')
-rw-r--r--bot/exts/evergreen/duck_game.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/evergreen/duck_game.py b/bot/exts/evergreen/duck_game.py
index ffd1b882..3f122d84 100644
--- a/bot/exts/evergreen/duck_game.py
+++ b/bot/exts/evergreen/duck_game.py
@@ -12,7 +12,8 @@ from PIL import Image, ImageDraw, ImageFont
from discord.ext import commands
from bot.bot import Bot
-from bot.constants import Colours, MODERATION_ROLES
+from bot.constants import Colours, Roles
+from bot.utils.decorators import with_role
DECK = list(product(*[(0, 1, 2)]*4))
@@ -312,10 +313,9 @@ class DuckGamesDirector(commands.Cog):
await self.send_help_embed(ctx)
@start_game.command(name="stop")
+ @with_role(Roles.moderator)
async def stop_game(self, ctx: commands.Context) -> None:
"""Stop a currently running game. Only available to mods."""
- if not any(role in ctx.author.roles for role in MODERATION_ROLES):
- return
try:
game = self.current_games.pop(ctx.channel.id)
except KeyError: