Open Armynator opened 1 month ago
I assume this is due to the interaction channel not being in the cache
If you have a way of checking after the error, try to inspect the channel cache, see which channels may be missing, also try another channel
Enable trace logs for the net.dv8tion.jda.internal.requests
package, so you can see if there's a point in which the channel was deleted, the general goal being to reconstitute what happened exactly
General Troubleshooting
Version of JDA
5.1.2
Expected Behaviour
Sometimes button interactions randomly start failing and won't work anymore until a full bot restart. This happens seemingly randomly, sometimes after a few hours, sometimes after a few days of the bot running without a restart.
The interactions sometimes only fail in some channels. Sometimes they start failing in all.
Nothings happens, no event is fired, just the error is logged: java.lang.IllegalStateException: Failed to create channel instance for interaction! Channel Type: 0
I've pasted the full stack trace below, with some details such as the exact channel data removed. After restarting the bot, the same interactions suddenly all work again.
Code Example for Reproduction Steps
Code for JDABuilder or DefaultShardManagerBuilder used
Exception or Error