diff options
| author | 2022-01-08 12:53:23 -0700 | |
|---|---|---|
| committer | 2022-01-08 12:53:23 -0700 | |
| commit | 3962e0e72e6bf6de4977092740ee79776159845e (patch) | |
| tree | 07692684d66ba52350ce429b9cbb319e93b16e44 | |
| parent | modlog: wait for guild init before using channel cache (diff) | |
Restrict allowed mentions for !eval results
| -rw-r--r-- | bot/exts/utils/snekbox.py | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/utils/snekbox.py b/bot/exts/utils/snekbox.py index fbfc58d0b..ef24cbd77 100644 --- a/bot/exts/utils/snekbox.py +++ b/bot/exts/utils/snekbox.py @@ -7,7 +7,7 @@ from functools import partial  from signal import Signals  from typing import Optional, Tuple -from discord import HTTPException, Message, NotFound, Reaction, User +from discord import AllowedMentions, HTTPException, Message, NotFound, Reaction, User  from discord.ext.commands import Cog, Context, command, guild_only  from bot.bot import Bot @@ -218,7 +218,8 @@ class Snekbox(Cog):              if filter_triggered:                  response = await ctx.send("Attempt to circumvent filter detected. Moderator team has been alerted.")              else: -                response = await ctx.send(msg) +                allowed_mentions = AllowedMentions(everyone=False, roles=False, users=[ctx.author]) +                response = await ctx.send(msg, allowed_mentions=allowed_mentions)              scheduling.create_task(wait_for_deletion(response, (ctx.author.id,)), event_loop=self.bot.loop)              log.info(f"{ctx.author}'s job had a return code of {results['returncode']}")  |