discordjs interactions

Hello everyone, I have a script that handles an interaction comes through my bot, is there anyway to answer this interaction through another script without calling the second script in the first one?
7 Replies
d.js toolkit
d.js toolkit•5d ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
treble/luna
treble/luna•5d ago
you can add a second listener but thats not recommended You should have 1 listener and a handler handling different types of interactions
JohnDilinger
JohnDilingerOP•5d ago
there's no something like interaction ID that i can send response through? I can handle this since every interaction is recorded to a database so can you guide me on how to handle the response with the token and id just a brief would work it's too complicated to explain but all I can tell you that the second file will notice when an interaction happens also I can reply within 3 seconds ye it will notice because for every line get inserted in the database must go through the second script i told you it's too complicated 😄 the second file selects data from the database every 1s so for every line goes there I can handle the interactions it has to go to the database first because I get the response from the database it's a customized response depending on shit happens on the database it's a mssql database so when an interaction happens it executes a procedure and that procedure executes some shit inside the database and then inserts a line to a table that the script runs interval on that's not everything but a brief what happens behind the scenes
d.js docs
d.js docs•5d ago
:property: CommandInteraction#webhook [email protected] An associated interaction webhook, can be used to further interact with this interaction
JohnDilinger
JohnDilingerOP•5d ago
3s is enough also it's a must to reply from the second file yes i can edit interactions ye? the reply i mean okay that's so good so the 3s issue is fixed I can anser from the first and edit from the second but how can i edit? can you explain how the interaction webhook work? i haven't delt with such a thing
d.js docs
d.js docs•5d ago
:class: InteractionWebhook [email protected] Represents a webhook for an Interaction
JohnDilinger
JohnDilingerOP•5d ago
this page doesn't exist how can I get my webhook url?

Did you find this page helpful?