Summary
Hit this on a bot with only global commands (no debug_guilds/guild_ids anywhere). Every now and then, a command vanishes from the Discord client's command picker - "Unknown Integration" - only a full restart brings it back.
Reproduction Steps
- Register any slash command as global (no
debug_guilds/guild_ids set anywhere on the bot or command).
- Make it do nothing but defer,
asyncio.sleep(30), then reply.
- Run it, wait for it to finish.
- Immediately run any other slash command.
Works best with plenty of commands as it seemed to only corrupt half my commands
Minimal Reproducible Code
@bot.slash_command(name="slowtest")
async def slowtest(ctx: discord.ApplicationContext):
await ctx.defer()
await asyncio.sleep(30)
await ctx.followup.send("done")
Expected Results
Either command still works
Actual Results
Command disappears from the Discord client's command list. Trying it shows "Unknown Integration" client-side. No exception, no log output, nothing printed on the bot's side at all - the interaction never seems to reach process_application_commands's failure path in any visible way. Only fixed by a full bot restart (which runs an unfiltered sync_commands() via on_ready).
Root cause of the code, once you go looking:
(source)
Intents
Tested with discord.Intents.all() not intent-related as far as I can tell
System Information
- Python v3.11.16-final
- py-cord v2.8.1-final
- aiohttp v3.14.3
- system info: Linux 7.0.0-30-generic #30-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 18:22:54 UTC 2026
Checklist
Additional Context
Related to #1561 / PR #1262, which fixed the guild_id string-vs-int comparison in this same function - that fix is present and working. This is a separate gap in the same fallback, specific to global commands, that #1262 didn't cover.
Summary
Hit this on a bot with only global commands (no
debug_guilds/guild_idsanywhere). Every now and then, a command vanishes from the Discord client's command picker - "Unknown Integration" - only a full restart brings it back.Reproduction Steps
debug_guilds/guild_idsset anywhere on the bot or command).asyncio.sleep(30), then reply.Works best with plenty of commands as it seemed to only corrupt half my commands
Minimal Reproducible Code
Expected Results
Either command still works
Actual Results
Command disappears from the Discord client's command list. Trying it shows "Unknown Integration" client-side. No exception, no log output, nothing printed on the bot's side at all - the interaction never seems to reach process_application_commands's failure path in any visible way. Only fixed by a full bot restart (which runs an unfiltered sync_commands() via on_ready).
Root cause of the code, once you go looking:
(source)
Intents
Tested with discord.Intents.all() not intent-related as far as I can tell
System Information
- Python v3.11.16-final - py-cord v2.8.1-final - aiohttp v3.14.3 - system info: Linux 7.0.0-30-generic #30-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 18:22:54 UTC 2026Checklist
Additional Context
Related to #1561 / PR #1262, which fixed the guild_id string-vs-int comparison in this same function - that fix is present and working. This is a separate gap in the same fallback, specific to global commands, that #1262 didn't cover.