#Keep getting Unknown Message on route: ButtonInteraction.editReply()
28 messages · Page 1 of 1 (latest)
• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.
node -v: v20.0
This is the line on the stack trace which errors:
collector.on("end", async (collected, reason) => {
if (reason === "time") {
await interaction.editReply({ //here
embeds: [
EmbedBuilder.from(
interaction.message.embeds[0]
).setDescription("You ran out of time"),
],
components: [],
});
}
});
But I have added a catch here with better logs. But I can't reproduce the error well enough:
collector.on("end", async (collected, reason) => {
if (reason === "time") {
await interaction.editReply({
embeds: [
EmbedBuilder.from(
interaction.message.embeds[0]
).setDescription("You ran out of time"),
],
components: [],
}).catch((err) => {
console.log('The ticket module errored!');
console.log(err);
console.log(collected, reason)
})
}
});
don't you mean to use collected instead of interaction?
No
Actually
That's a good point
interaction in this case would be my main <ButtonInteraction> coming from my button to begin with, which I do deferReply() at the top so I don't think that should be an issue
but you already edit the reply
You can editReply how ever many times you want
Gotta be within 15 mins ofc
Which this is
Unknown interaction and Unknown message is different mate
ooh sorry I will post it in related chat
No worries man
thanks
That original interaction‘s reply simply doesn’t exist anymore. Was it ephemeral?
It was yes
So maybe if it ends with time but someone deleted the reply it still tries to edit?
Then the use can dismiss it any time they want and it‘ll be gone
It does, yes
And I guess we can't tell if someone deletes an interaction response which is ephemeral either right?
Should I just catch and ignore it if it errors, or should I do something else?
You can. By catching that error😉
So no other way of like, maybe checking a cache or so if the interaction still exists?
Only trying and failing
As I can't reproduce this, that's all