Dave Blunts
Dave Blunts
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
thanks for the help
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
now it works when i do this
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
ye i just remembered it should .editReply() if you defer
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
No description
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
seems to have the fixed the use
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
may this be the cause of the error?
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
i defered the response in the interaction create event
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
DiscordAPIError[10062]: Unknown interaction
at handleErrors (/root/projects/bots/zatbot/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/src/lib/handlers/Shared.ts:148:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at BurstHandler.runRequest (/root/projects/bots/zatbot/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/src/lib/handlers/BurstHandler.ts:144:20)
at _REST.request (/root/projects/bots/zatbot/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/src/lib/REST.ts:210:20)
at async ChatInputCommandInteraction.deferReply (/root/projects/bots/zatbot/node_modules/.pnpm/[email protected]/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:71:5)
at Ready.Execute (/root/projects/bots/zatbot/src/events/application/InteractionCreate.ts:17:47)
Emitted 'error' event on ZatClient instance at:
at emitUnhandledRejectionOrErr (node:events:403:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
requestBody: { files: undefined, json: { type: 5, data: { flags: undefined } } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
DiscordAPIError[10062]: Unknown interaction
at handleErrors (/root/projects/bots/zatbot/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/src/lib/handlers/Shared.ts:148:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at BurstHandler.runRequest (/root/projects/bots/zatbot/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/src/lib/handlers/BurstHandler.ts:144:20)
at _REST.request (/root/projects/bots/zatbot/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/src/lib/REST.ts:210:20)
at async ChatInputCommandInteraction.deferReply (/root/projects/bots/zatbot/node_modules/.pnpm/[email protected]/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:71:5)
at Ready.Execute (/root/projects/bots/zatbot/src/events/application/InteractionCreate.ts:17:47)
Emitted 'error' event on ZatClient instance at:
at emitUnhandledRejectionOrErr (node:events:403:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
requestBody: { files: undefined, json: { type: 5, data: { flags: undefined } } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
const msg = await interaction.reply({ content: 'Ping?', ephemeral: true});
console.log(msg);
//let latency = msg.createdTimestamp - interaction.createdTimestamp;
//console.log(latency);
const msg = await interaction.reply({ content: 'Ping?', ephemeral: true});
console.log(msg);
//let latency = msg.createdTimestamp - interaction.createdTimestamp;
//console.log(latency);
17 replies
DIAdiscord.js - Imagine an app
Created by Dave Blunts on 5/24/2024 in #djs-questions
What causes this to be seen as an unknown interaction?
14.15.2 djs
17 replies
DIAdiscord.js - Imagine an app
Created by Fractyl on 6/28/2023 in #djs-questions
Reaction Roles
very complex i know
20 replies
DIAdiscord.js - Imagine an app
Created by Fractyl on 6/28/2023 in #djs-questions
Reaction Roles
const { Client, Events, GatewayIntentBits, Partials } = require('discord.js');

const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions],
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
});

client.on(Events.MessageReactionAdd, async (reaction, user) => {
if (reaction.partial) {
try {
await reaction.fetch();
} catch (error) {
console.error('Something went wrong when fetching the message:', error);
return;
}
}
console.log(`${reaction.message.author}'s message "${reaction.message.content}" gained a reaction!`);
console.log(`${reaction.count} user(s) have given the same reaction to this message!`);
});
const { Client, Events, GatewayIntentBits, Partials } = require('discord.js');

const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions],
partials: [Partials.Message, Partials.Channel, Partials.Reaction],
});

client.on(Events.MessageReactionAdd, async (reaction, user) => {
if (reaction.partial) {
try {
await reaction.fetch();
} catch (error) {
console.error('Something went wrong when fetching the message:', error);
return;
}
}
console.log(`${reaction.message.author}'s message "${reaction.message.content}" gained a reaction!`);
console.log(`${reaction.count} user(s) have given the same reaction to this message!`);
});
20 replies
DIAdiscord.js - Imagine an app
Created by RajGM on 6/27/2023 in #djs-questions
discord bot in same server as NEXTJS Backend
ye
37 replies
DIAdiscord.js - Imagine an app
Created by RajGM on 6/27/2023 in #djs-questions
discord bot in same server as NEXTJS Backend
at least thats how i do it
37 replies
DIAdiscord.js - Imagine an app
Created by RajGM on 6/27/2023 in #djs-questions
discord bot in same server as NEXTJS Backend
thats how you tag someone with a bot
37 replies
DIAdiscord.js - Imagine an app
Created by RajGM on 6/27/2023 in #djs-questions
discord bot in same server as NEXTJS Backend
<@id>
37 replies
DIAdiscord.js - Imagine an app
Created by RajGM on 6/27/2023 in #djs-questions
discord bot in same server as NEXTJS Backend
yes
37 replies
DIAdiscord.js - Imagine an app
Created by RajGM on 6/27/2023 in #djs-questions
discord bot in same server as NEXTJS Backend
@rajgm you could probably just use a webhook if all you want is to send data from a nextjs server to a discord channel
37 replies
DIAdiscord.js - Imagine an app
Created by RajGM on 6/27/2023 in #djs-questions
discord bot in same server as NEXTJS Backend
i think webhooks would be the best option
37 replies
DIAdiscord.js - Imagine an app
Created by RajGM on 6/27/2023 in #djs-questions
discord bot in same server as NEXTJS Backend
or you could even opt for webhooks
37 replies