-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
32 lines (22 loc) · 1000 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import discord
import os
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as', self.user)
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name='"syro"'))
async def on_message(self, message):
msg = message.content.lower()
# don't respond to ourselves
if message.author == self.user:
return
if not msg[0:4] == 'syro':
return # ignore if first four characters are not "syro"
if msg == 'syro':
await message.channel.send('you can always do it yourself, right?')
return
if 'can you give' in msg and 'feedback' in msg:
await message.channel.send("Test cases did not work")
if 'help' in msg:
await message.channel.send("I won't help you with that because I expect you to be reading the textbook")
client = MyClient()
client.run(os.getenv("DISCORD_BOT_SECRET"))