1
0
mirror of https://gitlab.com/ddorn/tfjm-discord-bot.git synced 2025-02-14 11:01:20 +00:00
tfjm-discord-bot/src/tfjm_discord_bot.py

32 lines
770 B
Python
Raw Normal View History

#!/bin/python
from discord.ext import commands
from src.constants import *
# We allow "! " to catch people that put a space in their commands.
# It must be in first otherwise "!" always match first and the space is not recognised
2020-04-29 16:55:12 +02:00
bot = commands.Bot(("! ", "!"))
2020-04-29 16:55:12 +02:00
# Global variable to hold the tirages.
2020-04-29 15:14:35 +02:00
# We *want* it to be global so we can reload the tirages cog without
# removing all the running tirages
2020-04-27 11:43:16 +02:00
tirages = {}
@bot.event
async def on_ready():
print(f"{bot.user} has connected to Discord!")
2020-04-29 13:42:49 +02:00
bot.remove_command("help")
bot.load_extension("src.cogs.dev")
2020-04-29 15:14:35 +02:00
bot.load_extension("src.cogs.errors")
2020-04-28 20:25:27 +02:00
bot.load_extension("src.cogs.misc")
2020-04-29 15:14:35 +02:00
bot.load_extension("src.cogs.teams")
bot.load_extension("src.cogs.tirages")
2020-04-27 11:43:16 +02:00
if __name__ == "__main__":
bot.run(TOKEN)