2020-04-27 10:05:17 +02:00
|
|
|
#!/bin/python
|
|
|
|
|
|
|
|
from src.constants import *
|
2020-05-05 13:39:44 +02:00
|
|
|
from src.core import CustomBot
|
2020-04-30 17:26:33 +02:00
|
|
|
|
2020-04-27 22:26:04 +02:00
|
|
|
# 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-05-10 17:30:45 +02:00
|
|
|
from src.utils import fg
|
|
|
|
|
2020-04-27 10:05:17 +02:00
|
|
|
|
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 = {}
|
2020-04-27 10:05:17 +02:00
|
|
|
|
|
|
|
|
2020-05-10 17:30:45 +02:00
|
|
|
def start():
|
|
|
|
bot = CustomBot(("! ", "!"))
|
|
|
|
|
|
|
|
@bot.event
|
|
|
|
async def on_ready():
|
|
|
|
print(f"{bot.user} has connected to Discord!")
|
2020-04-27 10:05:17 +02:00
|
|
|
|
2020-05-10 17:30:45 +02:00
|
|
|
bot.remove_command("help")
|
|
|
|
bot.load_extension("src.cogs.dev")
|
|
|
|
bot.load_extension("src.cogs.errors")
|
|
|
|
bot.load_extension("src.cogs.misc")
|
|
|
|
bot.load_extension("src.cogs.teams")
|
|
|
|
bot.load_extension("src.cogs.tirages")
|
|
|
|
bot.load_extension("src.utils")
|
2020-04-27 10:05:17 +02:00
|
|
|
|
2020-05-10 17:30:45 +02:00
|
|
|
bot.run(TOKEN)
|
2020-04-27 11:43:16 +02:00
|
|
|
|
|
|
|
|
2020-04-27 10:05:17 +02:00
|
|
|
if __name__ == "__main__":
|
2020-05-10 17:30:45 +02:00
|
|
|
start()
|