discordBot/bot.py

31 lines
716 B
Python
Raw Normal View History

2019-04-08 21:30:51 -05:00
# Discord Bot Rewrite V2.2
# https://discordpy.readthedocs.io/en/rewrite/
from discord.ext.commands import Bot
import numpy as np
2019-04-08 21:30:51 -05:00
cogs = ["Modules.automod.automod", "Modules.automod.ouat"]
2019-04-08 21:30:51 -05:00
prefix = 'o!'
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 = ''
2019-04-08 21:30:51 -05:00
client = Bot(command_prefix=prefix)
client.remove_command("help")
2019-04-08 21:40:38 -05:00
2019-04-08 21:30:51 -05:00
@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)