aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-15 14:41:01 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-15 14:41:01 +0530
commit68a5973a32ac91da21797c0f179b3dac3a1c5b86 (patch)
treef2ca5249f3ce06ee4a642b1d42abaa9bfc9b8422
parent54cd7dcaee32ea3e0a41060d219952dc2b2fadd3 (diff)
added a better authentication method
-rw-r--r--bot.py18
1 files changed, 5 insertions, 13 deletions
diff --git a/bot.py b/bot.py
index 858731c..59ccd31 100644
--- a/bot.py
+++ b/bot.py
@@ -1,25 +1,16 @@
import discord
import random
-# import os # why
+import os # why
# from hentai import hentai
-# from dotenv import load_dotenv
+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 =
-
-
-
-
-
-
-
+load_dotenv()
+TOKEN = os.getenv('DISCORD_TOKEN')
# frontend stuff
client = discord.Client()
@@ -34,6 +25,7 @@ async def on_ready():
@client.event
async def on_message(message):
if message.author == client.user:
+ await message.channel.send("nice try nigga")
return
if message.content[0:6] == 'z!say ':