aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Ben Soyka <[email protected]>2022-01-08 12:53:23 -0700
committerGravatar Ben Soyka <[email protected]>2022-01-08 12:53:23 -0700
commit3962e0e72e6bf6de4977092740ee79776159845e (patch)
tree07692684d66ba52350ce429b9cbb319e93b16e44
parentmodlog: wait for guild init before using channel cache (diff)
Restrict allowed mentions for !eval results
-rw-r--r--bot/exts/utils/snekbox.py5
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']}")