To make it work normally I just had to set my guild_id on my commands, so they are forced for this server only :
@bot.tree.command(guild=guild_id, name='leave', description='Leave vc')
async def leave_call(interaction: discord.Interaction):
vc = discord.utils.get(bot.voice_clients, guild=interaction.guild)
if vc and vc.is_connected():
if isinstance(vc, voice_recv.VoiceRecvClient):
vc.stop_listening()
await vc.disconnect()
await interaction.response.send_message("Disconnected.", ephemeral=True)
else:
await interaction.response.send_message("Not connected.")
It's now working instantly and the logs returns the good value :
PS D:\MyBot> py main.py
2025-11-11 19:02:49 INFO discord.client logging in using static token
2025-11-11 19:02:50 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: some_session_id).
Connected as My-Bot#1111
7 commands synced on server My(correct)-Guild-ID