Minesweeper code error
am having weird error when i use the command and then lose and re use the command again the same command pop out like the pics below and i get this error
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^
DiscordAPIError[10062]: Unknown interaction
{
requestBody: {
files: [],
json: {
type: 7,
data: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
color: 7506394,
title: 'Minesweeper Game',
description: 'Go ahead and keep clicking the buttons! Gems clicked: 1\n' +
'Multiplier: 0.3'
}
],
components: [
{ type: 1, components: [Array] },
{ type: 1, components: [Array] },
{ type: 1, components: [Array] },
{ type: 1, components: [Array] },
{ type: 1, components: [Array] }
],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
}
},
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: ''
}
Node.js v20.11.0
10 Replies
- 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!and sometimes i get this error
Common causes of
DiscordAPIError[10062]: Unknown interaction
:
- Initial response took more than 3 seconds ➞ defer the response *.
- Wrong interaction object inside a collector.
- Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance)
* Note: you cannot defer modal or autocomplete value responsesthrow new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^
DiscordAPIError[40060]: Interaction has already been acknowledged.
{
requestBody: {
files: [],
json: {
type: 7,
data: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
color: 7506394,
title: 'Minesweeper Game',
description: 'Go ahead and keep clicking the buttons! Gems clicked: 1\n' +
'Multiplier: 0.3'
}
],
components: [
{ type: 1, components: [Array] },
{ type: 1, components: [Array] },
{ type: 1, components: [Array] },
{ type: 1, components: [Array] },
{ type: 1, components: [Array] }
],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
}
},
rawError: {
message: 'Interaction has already been acknowledged.',
code: 40060
},
code: 40060,
status: 400,
method: 'POST',
url: ''
}
Node.js v20.11.0
-
DiscordAPIError: Interaction has already been acknowledged
- [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
You have already replied to the interaction.
- Use <Interaction>.followUp()
to send a new message
- If you deferred reply it's better to use <Interaction>.editReply()
- Responding to slash commands / message componentsi already use
followup
and still
well you're trying to reply after already replying
am kinda sure an not
i think
If you are waiting for button or select menu input from a specific message, don't create the collector on the channel.
- Channel collectors return component interactions for any component within that channel.
can check my code
cuz its seems okay
ty it worked