aboutsummaryrefslogtreecommitdiff
path: root/bot.py
blob: 703ee2cb899d3f75271705924195526aeff62628 (plain)
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
import discord
import random
import os  # why
# from hentai import hentai
from dotenv import load_dotenv

# z!info
INFO_MESSAGE = "Discord bot created by Vidhu Kant Sharma"

greetings = ["Greetings", "Hello", "Hey", "Yahallo", "Namaskar", "Konnichiwa", "Yo"]

load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')

# frontend stuff
client = discord.Client()

# events
@client.event
async def on_ready():
    print(f'{client.user} has connected to Discord!')



@client.event
async def on_message(message):
    if message.author == client.user:
        return
    
    if message.content[0:6] == 'z!say ':
        response = message.content[5:]
        await message.channel.send(response)
        
    
    if message.content == 'z!info':
        response = INFO_MESSAGE
        await message.channel.send(response)



client.run(TOKEN)