aboutsummaryrefslogtreecommitdiff
path: root/modules/execute.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/execute.py')
-rw-r--r--modules/execute.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/execute.py b/modules/execute.py
index 4d3f426..1d9102e 100644
--- a/modules/execute.py
+++ b/modules/execute.py
@@ -7,6 +7,7 @@ from discord import Embed, Color, Message, Guild, TextChannel, Member
from discord.ext.commands import Bot
from compile_api import execute
+from filter import verify
CODE_BLOCK_REGEX: Pattern = re.compile("```(?P<lang>.*)\n(?P<code>[\\s\\S]*?)```")
INPUT_BLOCK_REGEX: Pattern = re.compile("input[: \t\n]*```(?P<lang>.*)?\n(?P<text>[\\s\\S]*?)```", re.IGNORECASE)
@@ -90,7 +91,10 @@ class ExecuteCog(object):
f"{(timedelta(seconds=30)-delta).seconds}secs"))
if not author.guild_permissions.manage_messages:
self.last_messaged[author.id] = datetime.now()
- response = await execute(code, *languages[lang])
+ language, version = languages[lang]
+ if not verify(message, language):
+ return
+ response = await execute(code, language, version)
if response.status_code == 429:
return await channel.send(
embed=Embed(