Skip to content

Commit 9fa8e2f

Browse files
feat: readd invigilator but at 5% of its full power
1 parent 1af656f commit 9fa8e2f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

bmt_discord_bot/cogs/viraj.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import re
2+
import random
23
from discord.ext import commands
34

45
PATTERN = re.compile(
@@ -21,6 +22,8 @@ def _correct_text(self, match):
2122
async def on_message(self, message):
2223
if message.author.bot:
2324
return
25+
if "proctor" in message.content.casefold() and random.random() < 0.05:
26+
await message.channel.send("*invigilator")
2427
for match in PATTERN.finditer(message.content):
2528
await message.channel.send(self._correct_text(match))
2629

0 commit comments

Comments
 (0)