discordBot/bot.py
officereso 6bc2f3a2dc Added join and leave messages for SSC guild
Signed-off-by: officereso <qrs01@snowtx.com>
2019-07-31 23:55:19 -05:00

33 lines
804 B
Python

# Discord Bot Rewrite V2.2
# https://discordpy.readthedocs.io/en/rewrite/
from discord.ext.commands import Bot
import numpy as np
cogs = ["Modules.TGH.automod.automod", "Modules.TGH.automod.ouat",
"Modules.SSC.autoReply.Join", "Modules.SSC.autoReply.Leave"]
prefix = 'o!'
token = ''
tokens = open("tokens.txt", 'r')
tokens = tokens.readlines()
bot_running = input("Would you like to run the test bot[T] or the default[D] :: ")
if bot_running == 'T':
token = tokens[0].rstrip()
elif bot_running == 'D':
token = tokens[1].rstrip()
tokens = ''
client = Bot(command_prefix=prefix)
client.remove_command("help")
@client.event
async def on_ready():
print('Logged in as:')
print('{0.user}'.format(client))
for cog in cogs:
client.load_extension(cog)
client.run(token)