File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 r"\b(\w*)(ise|isation|isations|ising|ised|ises|iser|isers)\b" ,
77 re .IGNORECASE ,
88)
9+ IGNORED_CATEGORY_IDS = [1031955833371758754 ]
910
1011
1112class Viraj (commands .Cog ):
1213 """For correcting Viraj."""
1314
1415 def __init__ (self , bot ):
1516 self .bot = bot
16-
17+
1718 def cog_check (self , ctx ):
1819 return ctx .guild .id == 786701065856221205
1920
@@ -25,7 +26,9 @@ def _correct_text(self, match):
2526 async def on_message (self , message ):
2627 if message .author .bot :
2728 return
28- if "proctor" in message .content .casefold () and random .random () < 0.05 :
29+ if message .channel .category_id in IGNORED_CATEGORY_IDS :
30+ return
31+ if "proctor" in message .content .casefold () and random .random () < 0.05 :
2932 await message .channel .send ("*invigilator" )
3033 for match in PATTERN .finditer (message .content ):
3134 await message .channel .send (self ._correct_text (match ))
You can’t perform that action at this time.
0 commit comments