[Collector Interaction] Interaction has already been acknowledged. #73
Comments
Do you have the client.on('modalSubmit) method in the same file as the command? If so, what worked for me was moving that method to another file like main.js or with an event handler. |
Well, I've tried to do that so I wanted to use the interaction from the command, so I've tried to use parameters, but the same issue still appears, here's example, in the component collector: const modalHandler = require('../../events/modalSubmit')
collector.on('collect', async (i) => {
if(i.customId === 'button') {
showModal({
client: client,
interaction: i
})
modalHandler(interaction, collector)
}
}) And the event file const modalHandler = async (interaction, collector) => {
client.on('modalSubmit', async (modal) => {
// Th same event code goes here
}
}
module.exports = modalHandler |
Do you have on the interactionCreate event a deferReply method? |
Well, I use command handler, I've used the Like: // On the top of the code
await interaction.deferReply()
// Some rows defining goes here...
// And now followUp with the components
const msg = await interaction.followUp({ ... }) |
Delete the deferReply method and if u have followUp or editReply methods on your commands change It by reply or limit this deferReply method to all your command except this one |
But it's not caused from the command interaction.. I've marked from where does the error belongs to, when I use |
The problem is the thing that i said to you |
Because the collector collect those interactions and you on your interactionCreate you deferReply that interaction and the error is because you cannot deferReply this interaction and use on the show Modal method |
Try It and you Will se |
You can do this instead of replace the followUp and editReply methods if(!<cmd> === "your_modal_command"){
interaction.deferReply()
} |
Alrighty, should I disable the |
This code says that if the Slash is not the modal Slash deferReply that interaction if not it doesn't deferReply that interaction and in this case the whole modal command |
If you do not understand something let me know |
I think is better on github so all the users that have this problem can solve it |
Yeah true, anyways, I've tried to not to use const msg = await interaction.reply({ components: [row5], content: `Weird buttons just showed up!`, ephemeral: false, fetchReply: true })
const collector = msg.createMessageComponentCollector({ time: 120000 }) But like uh, am bored like literally I don't know what to do, would be my pleasure if you explain me it step by step... |
ps: I use |
Whats the name of your command? |
wordle |
ok if(!<cmd> === "wordle"){
await interaction.deferReply()
}
Like that and only you try the command and luckily it will works propertly |
in cmd put how you define your command |
okay I'll try |
So it has differences if I |
Well nope, still facing the issue... |
Show your interactionCreate |
@PabloRNC I'm having this same error, with nothing but the modalSubmit event giving a deferReply you can contact me at 10KAIDAN#0001 on discord |
Show me your command and your interactionCreate |
@PabloRNC is it possible to edit the current message without following it up because the bot im making is using it like a ban reason and then edit the message saying banned successfully? |
Mmm i do not know what do you mean if can provide some screenshots |
You can like modal.reply with fetchReply in true and then edit It like a interaction.reply method |
i already changed to discord.js v14 and it had the necessary things with the function 2022-04-30.12-45-56.mp4 |
You can edit It with modal.interaction.message.edit on the discord -modals npm i think |
I tried it and I just got undefined |
On discord-modals is |
nvm djs v13.7 released already |
So I've tried to use the collector interaction like:
The first time the command works fine, but the second time I use the command I get Discord API error with "interaction has been already acknowledged. Here's the modalSubmit event:
I am suffering this issue ages ago, idk what to do to solve it.. any solution??
The text was updated successfully, but these errors were encountered: