Skip to content

Commit 3f79a17

Browse files
authored
Merge pull request #4 from compsoc-edinburgh/bot-less-typing
Make bot to "typing" less
2 parents de8059d + f2eeb74 commit 3f79a17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,12 @@ async def on_message(message: discord.Message):
235235
if message.author == bot.user:
236236
return
237237

238-
await message.channel.trigger_typing()
239-
240238
try:
241239
# Check if the message is a status check via a very simple:tm: regex
242240
# thx regex101.com
243241
if re.match(r"^(is +)?(my *ed|learn|[\/&\+])* +down( |\?|$)", message.content, re.IGNORECASE | re.MULTILINE):
242+
await message.channel.trigger_typing()
243+
244244
# check if myed is down
245245
try:
246246
response = requests.get("https://www.myed.ed.ac.uk/myed-progressive/", timeout=5)

0 commit comments

Comments
 (0)