From 68a5973a32ac91da21797c0f179b3dac3a1c5b86 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 15 Dec 2020 14:41:01 +0530 Subject: added a better authentication method --- bot.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'bot.py') 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 ': -- cgit v1.2.3