Interactions no longer work after bot restart
Does Kordex support some way to make interactions still work after bot restart, besides using Kord's functions for creating components?
More specifically, does Kordex support passing data through button IDs? (we'll likely contribute this functionality if it isn't alread supported)
15 Replies
There isn't really anything there other than the callback system and that isn't very useful
Solution
You should handle the events
I don't think there's really any way to handle this kind of thing without some kind of persistent storage and not all bots are capable of that
will serialize event data inside the button ID muhahahahaha (we'll contribute it I think)
That won't exactly be enough for the KordEx components API
Just do that and handle the event yourself
Yep, that's what I'm currently doing
orgh, I can't use
respond
and such now
I just did whatever this is so that I'll be able to do stuff for both buttons and slash commandsUse the interaction object on the event
(discord forgot to send image)
wait, huh?
wdym?
You sounded like you didn't know how to respond
I mean, pass the
event
thingy from the action
block to what interaction object?That's not what I said
event.interaction
Ah
Yeah that's what I'm doing
Follow-up question:
I'm still getting the unknown component message in the logs. Is there a way to tell kordex to ignore this interaction?
I don't recall there being anyting specifically for that
but that's a debug log
don't use debug logging in production
yep, not planning to
just annoyed me