The issue: Commands registered as global commands weren't being synced when calling tree.sync(guild=...) because they weren't associated with the specific guild context. The fix: Call tree.copy_global_to(guild=...) before sync() to copy global commands to each guild's context. This makes commands appear immediately instead of requiring global sync (which can take up to 1 hour). Reference: discord.py FAQ recommends copy_global_to for development when you want immediate command availability in specific guilds.
30 KiB
30 KiB