déplacement du chargement des extensions

This commit is contained in:
Mylloon 2020-12-16 19:26:51 +01:00
parent ce601feb40
commit d579d0e1e3

View file

@ -9,9 +9,6 @@ from tokens import token_discord as token
client = commands.Bot(command_prefix = ".", case_insensitive = True, intents = discord.Intents.all()) client = commands.Bot(command_prefix = ".", case_insensitive = True, intents = discord.Intents.all())
@client.event
async def on_connect():
print(f"Connecté avec le token : {token}.")
print("Chargement des extensions & librairie...") print("Chargement des extensions & librairie...")
client.load_extension("cogs.help") client.load_extension("cogs.help")
client.load_extension("cogs.utils") client.load_extension("cogs.utils")
@ -21,6 +18,10 @@ async def on_connect():
client.load_extension("cogs.fun") client.load_extension("cogs.fun")
client.load_extension("cogs.autopublish") client.load_extension("cogs.autopublish")
@client.event
async def on_connect():
print(f"Connecté avec le token : {token}.")
@client.event @client.event
async def on_ready(): async def on_ready():
await client.change_presence(status = discord.Status.online, activity = discord.Activity(name = ".help", type = discord.ActivityType.playing)) await client.change_presence(status = discord.Status.online, activity = discord.Activity(name = ".help", type = discord.ActivityType.playing))