How do I check if the user ID is actually equals to the user ID in interaction-handlers
Is there a way to check if the user ID that clicked the button is equals to the user that ran the command? For example:
if (interaction.user.id !== <command_user>.user.id)
12 Replies
You can pass the user ID through the customId and get it that way
That would be your parse function in the interaction handler
hm
so for ex the ID would be
wipe-accept_intuserid_memid
You only need 1 users ID
interaction.user.id
is the person who pressed the button or whatever
The ID from your customId is the person who originally executed the commandwell for this instance, I'm including another ID for a member arg
like
>cmd @mem
so
im adding that as wellWell, then yeah, should return them as an object in the this.some()
well so far seems like mine is working
ya i think thisll be it
i mean
it works™️
Why are you checking if it starts with the interaction.user.id (person pressing the button)
I'm just gonna take myself out of this thread, this has just brainfucked me
lmfaoo
dw ill fix it later
in 50 years