Unknown Interaction
For some reason whenever my bot reboots, commands that clearly exist will error with “Discord API Error: Unknown Interaction”. The strange part about this is that it will often execute the command and then error. Is there some way to avoid this? It has also randomly happened on times that wasn’t after a reboot as well.
Solution:Jump to solution
seems to be working so far? nobody has reported encountering that issue recently so I’m going to assume deferring the reply fixed it.
12 Replies
Actually after further testing, idk what causes the error. It’s kinda baffling because it will work sometimes and error others.
Sounds like there are network issue either on your end or Discord's.
is there any way of resolving this easily or testing which end the network issue is on?
i’m hosting on digital ocean app platform and haven’t had any network issues with anything else/any other projects.
wait it's not that you try to resolve buttons of commands that were used prior to the reboot by any chance is it? And is this custom buttons or for example PaginatedMessage? Is it buttons or such at all or the commands in general?
it’s just commands in general. not buttons or anything.
i wasn’t sure if discord is caching an old version of the command in the discord client or something?
because sometimes restarting the client resolves the issue
the discord client does some caching yes but as long as you do not run commands that are entirely deleted that should be fine
@vladdy any ideas?
unknown interaction -> replied too slow
hm that would indeed suggest network or system too slow or just not deferring for long running commands then
but if it's flaky and with reboots it gets better then the former 2 sound more likely though deferring may fix it
okay, i’ll try deferring the reply and see if that helps at all
@Jesse got any new info?
Solution
seems to be working so far? nobody has reported encountering that issue recently so I’m going to assume deferring the reply fixed it.
Perfect