You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Confirm thread creation with react to contact causes bot to soft-block users with disabled DMs #3442
React to contact message+emoji set and confirm thread creation set.
When the user has their privacy settings turned off (disallow DMs), the user clicks the react to contact emoji, the bot tries to send the confirm thread creation message to the user, the user's ticket is now stuck in a "limbo" state (stored in cache as "not ready"). A bot restart is required to clear the cache, even if the user allows DMs in settings.
Symptoms:
Spammed logs of thread setup timed out, 25s delay in responses
core.thread[53] - WARNING: Waiting for thread setup timed out.
When using the ?contact command on a soft-blocked user, bot responds with "Thread not created / A thread for [...] already exists".
Note: these symptoms may be caused by other unrelated bugs as well.
Hi @Taaku18, I'd like to work on this.
I traced it to core/thread.py in ThreadManager.create() — the destination.send(...) call for the confirm-thread-creation prompt isn't wrapped in a try/except. When the recipient has DMs disabled, this raises discord.Forbidden uncaught, so view.wait() never runs and the thread stays in cache in a "not ready" state, matching the symptoms in the issue (timeout warnings, stuck contact command).
Fix: catch discord.Forbidden around that send, mark the thread cancelled, and clear the cache entry immediately. Will open a PR shortly.
Sure @13-Prabhat feel free to create a pr, then we will review and test your changes. Keep in mind to target the dev branch and also create your branch based of development just to avoid issues.
Activity
13-Prabhat commentedon Jun 18, 2026
Hi @Taaku18, I'd like to work on this.
I traced it to core/thread.py in ThreadManager.create() — the destination.send(...) call for the confirm-thread-creation prompt isn't wrapped in a try/except. When the recipient has DMs disabled, this raises discord.Forbidden uncaught, so view.wait() never runs and the thread stays in cache in a "not ready" state, matching the symptoms in the issue (timeout warnings, stuck contact command).
Fix: catch discord.Forbidden around that send, mark the thread cancelled, and clear the cache entry immediately. Will open a PR shortly.
martinbndr commentedon Jun 18, 2026
Sure @13-Prabhat feel free to create a pr, then we will review and test your changes. Keep in mind to target the dev branch and also create your branch based of development just to avoid issues.
fix: handle Forbidden when sending confirm-thread-creation DM (#3442)