NP
NP
DIdiscord.js - Imagine ❄
Created by NP on 1/18/2025 in #djs-questions
ERROR: Shard 29's Client took too long to become ready
ty
6 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/18/2025 in #djs-questions
ERROR: Shard 29's Client took too long to become ready
alr
6 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/18/2025 in #djs-questions
ERROR: Shard 29's Client took too long to become ready
300 seconds or more than that?
6 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/18/2025 in #djs-questions
ERROR: Shard 29's Client took too long to become ready
what would you suggest?
6 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
and we have that defer in now so i'm not sure
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
if it's intermittent issue then it's more likely?
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
the other code I showed you was from commandsjs
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
this needs to be defer reply?
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
@treble/luna i've pushed this to prod, however we're still getting these errors
DiscordAPIError[10062]: Unknown interaction
at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.reply (/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async Client.<anonymous> (file:///app/src/bot.js:69:4) {
requestBody: { files: [], json: { type: 4, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1328497333968568391/aW50ZXJhY3Rpb246MTMyODQ5NzMzMzk2ODU2ODM5MTpOZEdGTFBVaDFCdlhMcXRzMEtuRDQ2UVBLRVBOd3ZJejhsZGZrN3NYWFBCaGZxZVhkVUZEeXhrWmx1S0pVR2R2REpMQlFsVmJMdmxOQnpNYjd5Skd6Zk5jSWN2WjRnOHBQblhoUGNJakloWWVtbWJKMzljdXZJQVo5UHhjclNMMw/callback'
}
DiscordAPIError[10062]: Unknown interaction
at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.reply (/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async Client.<anonymous> (file:///app/src/bot.js:69:4) {
requestBody: { files: [], json: { type: 4, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1328497333968568391/aW50ZXJhY3Rpb246MTMyODQ5NzMzMzk2ODU2ODM5MTpOZEdGTFBVaDFCdlhMcXRzMEtuRDQ2UVBLRVBOd3ZJejhsZGZrN3NYWFBCaGZxZVhkVUZEeXhrWmx1S0pVR2R2REpMQlFsVmJMdmxOQnpNYjd5Skd6Zk5jSWN2WjRnOHBQblhoUGNJakloWWVtbWJKMzljdXZJQVo5UHhjclNMMw/callback'
}
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
cool thank you! looks to work locally!
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
okay cool, so defering it is the first thing I need to do after async execute?
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
ah okay, so I need to defer it before async execute?
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
Here's the commands.js code, can you see any issues? if not I can share the bot.js
export const bump = {
data: new SlashCommandBuilder()
.setName('xxx')
.setDescription('xxx!'),
async execute(interaction){

const { member } = interaction;
const isOwner = interaction.guild?.ownerId === interaction.member?.user?.id;
if (!interaction.guild) {
await interaction.reply({ content: 'This command can only be used in a server.', ephemeral: true });
return;
}
const isAdmin = member.permissions.has(PermissionsBitField.Flags.Administrator);
const hasManageGuildPermission = member.permissions.has(PermissionsBitField.Flags.ManageGuild);

const hasPermission = isOwner || isAdmin || hasManageGuildPermission;
if(!hasPermission){
interaction.reply({
content: ":bangbang: You must be **owner**, **admin**, or have the '**manage guild**' permission.",
ephemeral: true
})
return;
}

const response = await fetch(`apiurl`, {
method: 'POST',
headers: {
'Content-Type': 'application',
'X-Auth-Key': "apikey"
},
body: JSON.stringify({
guildId: interaction.guild.id
})
});

await interaction.deferReply();

if (response.status !== 200) {
const xErrorMessage = response.headers.get('x-error-message');
const errorMessage = xErrorMessage || 'errormsg';

await interaction.followUp({
content: errorMessage,
ephemeral: true
}).catch(error => {
console.error('Failed to follow up on interaction:', error);
});
return;
}

// Success message
const guildName = interaction.guild.name;
await interaction.followUp({
content: `**${ guildName }** has been successfully xxx!`,
ephemeral: false
});

}
};
export const bump = {
data: new SlashCommandBuilder()
.setName('xxx')
.setDescription('xxx!'),
async execute(interaction){

const { member } = interaction;
const isOwner = interaction.guild?.ownerId === interaction.member?.user?.id;
if (!interaction.guild) {
await interaction.reply({ content: 'This command can only be used in a server.', ephemeral: true });
return;
}
const isAdmin = member.permissions.has(PermissionsBitField.Flags.Administrator);
const hasManageGuildPermission = member.permissions.has(PermissionsBitField.Flags.ManageGuild);

const hasPermission = isOwner || isAdmin || hasManageGuildPermission;
if(!hasPermission){
interaction.reply({
content: ":bangbang: You must be **owner**, **admin**, or have the '**manage guild**' permission.",
ephemeral: true
})
return;
}

const response = await fetch(`apiurl`, {
method: 'POST',
headers: {
'Content-Type': 'application',
'X-Auth-Key': "apikey"
},
body: JSON.stringify({
guildId: interaction.guild.id
})
});

await interaction.deferReply();

if (response.status !== 200) {
const xErrorMessage = response.headers.get('x-error-message');
const errorMessage = xErrorMessage || 'errormsg';

await interaction.followUp({
content: errorMessage,
ephemeral: true
}).catch(error => {
console.error('Failed to follow up on interaction:', error);
});
return;
}

// Success message
const guildName = interaction.guild.name;
await interaction.followUp({
content: `**${ guildName }** has been successfully xxx!`,
ephemeral: false
});

}
};
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
how would I check this?
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
im not sure what could be the issue
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
yeah so I have added this
await interaction.deferReply();
await interaction.deferReply();
and i'm using interaction followup to reply
await interaction.followUp({
await interaction.followUp({
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
it's intermittent, and only happens for some interactions which I can't understand
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/11/2025 in #djs-questions
unknown interaction error
@polarwolvinny ❄🌈 i've tried to resolve these things listed but I cant get it to work
32 replies
DIdiscord.js - Imagine ❄
Created by NP on 1/5/2025 in #djs-questions
Shards and presence
Is there any docs on that?
5 replies