Restrict quote remove command to admins

This commit is contained in:
2021-01-29 11:23:16 +01:00
parent d7f516ed8a
commit 3daa251e59

2
bot.py
View File

@@ -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!")