diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-15 14:28:05 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-15 14:28:05 +0530 |
commit | 663a73a48fb097cc11d2fc3ca6067f182bd5ed5e (patch) | |
tree | 1727af4ff05b0ec3604e57205e382409e8664fdf | |
parent | 433cf3928f3550bd64efe7237f7c1d8754ec42f9 (diff) |
added a fairly simple bot
-rw-r--r-- | bot.py | 50 |
1 files changed, 50 insertions, 0 deletions
@@ -0,0 +1,50 @@ +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 = + + + + + + + + +# 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) |