diff --git a/main.py b/main.py index a6d324a..1311eec 100644 --- a/main.py +++ b/main.py @@ -19,10 +19,11 @@ client.modules: list[BaseModule] = [] @client.event async def on_ready(): client.modules = [m(client) for m in MODULES] - await tree.sync(guild=discord.Object(id=gitea.GUILD_ID)) for m in client.modules: await m.load() - print(f"Logged in as {client.user}") + async for guild in client.fetch_guilds(): + await tree.sync(guild=discord.Object(id=guild.id)) + print(f"Logged in as {client.user} on {len(client.guilds)} servers!") @client.event @@ -44,6 +45,5 @@ async def on_message(message): if not handled: handled = await m.handle_message(message) - # Initialise le client client.run(token)