Vicy_Publique/bot.py
2026-08-16 19:37:15 +02:00

25 lines
No EOL
753 B
Python

from utils.logger import log_info, log_error
from discord.ext import commands
import discord
intents = discord.Intents.default()
intents.message_content = True
intents.members = True
bot = commands.Bot(command_prefix='/', intents=intents)
@bot.event
async def on_ready():
try:
log_info(f"Le bot {bot.user} a démarré avec succès.")
await bot.change_presence(activity=discord.Game(name="la version 1.2"))
except Exception as e:
log_error(f"Erreur lors du démarrage du bot: {e}")
@bot.event
async def on_ready():
try:
synced = await bot.tree.sync()
print(f"Synchronisé {len(synced)} commande(s)")
except Exception as e:
print(f"Erreur lors de la synchronisation des commandes : {e}")