We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1af656f commit 9fa8e2fCopy full SHA for 9fa8e2f
1 file changed
bmt_discord_bot/cogs/viraj.py
@@ -1,4 +1,5 @@
1
import re
2
+import random
3
from discord.ext import commands
4
5
PATTERN = re.compile(
@@ -21,6 +22,8 @@ def _correct_text(self, match):
21
22
async def on_message(self, message):
23
if message.author.bot:
24
return
25
+ if "proctor" in message.content.casefold() and random.random() < 0.05:
26
+ await message.channel.send("*invigilator")
27
for match in PATTERN.finditer(message.content):
28
await message.channel.send(self._correct_text(match))
29
0 commit comments