ChatInputCommandInteraction
How to correctly define
ChatInputCommandInteraction
, I tried importing it from the framework, however is returned this: TypeError: Right-hand side of 'instanceof' is not an object
I'm trying to do this:
I have a createError
function, which sends a embed with the provided text and then deletes the message and the embed after some seconds, however I want it only reply if the variable is a interaction instance.
Here's the createError code: https://pastebin.com/nNHV5Xr4
isInteractionInstance function: https://pastebin.com/fKsTMAUi16 Replies
ChatInputCommandInteraction
is a type, not a class. CommandInteraction
is a class, though.
You might want to use Interaction
though, to handle buttons & etcgood idea, do I import
Interaction
from the framework?It's from discord.js
TypeError: Right-hand side of 'instanceof' is not an object
Sorry, technically the class is
BaseInteraction
it worked, however when a message object is provided it sends the embeds replying to the command, when it should send the embed (not replying), then delete the command and the embeds 3 seconds after
how would it send the embeds replying to the command if there was no command
wdym
wdym
wdym there was not a command
I mean command interaction
i was talking about message commands
Show your updated code
Pastebin
createError function - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
And the function?
Pastebin
isInteractionInstance function - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.