-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
48 lines (37 loc) · 1.15 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import discord
import os
import io
import json
import requests
TOKEN=os.getenv("TOKEN")
client=discord.Client()
embed=discord.Embed()
@client.event
async def on_ready():
print('Logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
username=str(message.author).split('#')[0]
usr_msg=str(message.content)
channel=str(message.channel.name)
print(f'{username}:{usr_msg} ({channel})')
if message.author==client.user:
return
if usr_msg.lower()=="-k hello":
await message.channel.send(f"Hi! I'm Kasumi\n howdy? @{username}")
return
elif usr_msg.lower()=="-k hru":
await message.channel.send("I'm doing great! How are you?")
return
elif 'lol' in message.content.lower():
await message.channel.send(":joy: lol")
return
elif ('sniperwolf' or 'sssniperwolf') in message.content.lower():
embed.set_image(url='https://tenor.com/view/sssniperwolf-gif-18432997')
await message.channel.send(embed=embed)
return
elif 'happy birthday' in message.content.lower():
embed.set_image(url='https://tenor.com/SZbC.gif')
await message.channel.send(embed=embed)
return
client.run(TOKEN)