From 3daa251e597eea06e1aefcb40a53680230316b50 Mon Sep 17 00:00:00 2001 From: Siphalor Date: Fri, 29 Jan 2021 11:23:16 +0100 Subject: [PATCH] Restrict quote remove command to admins --- bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot.py b/bot.py index 82cf8d4..0af2f54 100644 --- a/bot.py +++ b/bot.py @@ -294,6 +294,8 @@ async def quote_command(ctx: commands.Context, author: Optional[str], *, quote: @bot.command(name='quote_remove', brief='Remove a quote') async def quote_remove_command(ctx: discord.Context, author: str, quote: str): + if not ctx.author.guild_permissions.administrator: + await ctx.channel.send("Only admins are allowed to remove quotes!") quotes: Optional[dict[str, List[str]]] = config_get("guild_access", guild=ctx.guild.id) if quotes is None: await ctx.channel.send("No quotes available!")