#Hello, how to detect if a interaction was Unknown (for example an Event)

1 messages · Page 1 of 1 (latest)

digital lintel
#

Hello, how to detect if a interaction was Unknown (for example an Event)

daring quest
#

the red error text?

digital lintel
#

is there an event that detects unknown interactions

daring quest
#

nope

#

unknown interaction is just a failure to respond

digital lintel
#

No method to respond with error message ?

daring quest
#

no such event exists, no

#

what's the root issue? might be better to try address that instead

digital lintel
#

I don't know, from time to time my button/slash command crashes for unknown interaction

#

when sending the return message

daring quest
#

if it's the random ones you see in console then you'd best ignore it

#

but if you have a proper traceback and it shows it erroring somewhere in your command that should be fixable

digital lintel
daring quest
digital lintel
daring quest
#

could you perhaps show the code and paste the full error?

digital lintel
#

Yes

#

my bot just started 10 minutes ago

#

I don't have error now

daring quest
#

if you do get one feel free to tag me here with it

digital lintel
#

ok

shrewd quail
daring quest
#

that... isn't really going to help anything, unknown interaction is generally a symptom of deeper errors in your code

shrewd quail
#

I honestly added this only because the bot when chunking was responding too long haha

#

in a slightly different version but was based on kind of a status checker field

daring quest
#

ah yeah, during on ready it can't recieve anything either

shrewd quail
#

but as you say, in other cases it means that probably something is too time-consuming without deferring ;p

digital lintel
#

Traceback (most recent call last):
File "/home/container/.local/lib/python3.10/site-packages/discord/client.py", line 378, in _run_event
await coro(*args, **kwargs)
File "/home/container/cogs/cooldown.py", line 21, in on_application_command_error
raise error
File "/home/container/.local/lib/python3.10/site-packages/discord/bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "/home/container/.local/lib/python3.10/site-packages/discord/commands/core.py", line 375, in invoke
await injected(ctx)
File "/home/container/.local/lib/python3.10/site-packages/discord/commands/core.py", line 124, in wrapped
ret = await coro(arg)
File "/home/container/.local/lib/python3.10/site-packages/discord/commands/core.py", line 1312, in _invoke
await command.invoke(ctx)
File "/home/container/.local/lib/python3.10/site-packages/discord/commands/core.py", line 375, in invoke
await injected(ctx)
File "/home/container/.local/lib/python3.10/site-packages/discord/commands/core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: NotFound: 404 Not Found (error code: 10062): Unknown interaction
@daring quest

placid atlas
#

@digital lintel dm me code

digital lintel
#

ok

#

@placid atlas send

placid atlas
#

ok

placid atlas
#

@digital lintel see ur dm