DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE

I'm used to the old days of just doing commands with text in the chat !commands for example. Slash commands and such are quite new so I was going over the documentation page from Discord themselves, and have been trying to figure out "DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE".
res.send({
type: InteractionResponseType.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE,
});
res.send({
type: InteractionResponseType.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE,
});
I have this part.. but now I'm trying to figure out.. where do I end up sending the "DEFERRED_UPDATE_MESSAGE" to update the message, and how do I do it specifically? There wasn't much on the topic of editing messages much in a clear way that I could figure out myself.
11 Replies
d.js toolkit
d.js toolkit•2d ago
- 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!
Amgelo
Amgelo•2d ago
um are you using /core or djs?
Izzibaby
Izzibaby•2d ago
I'm familar with discord.js, I'm unsure what /core is. So I'm assuming the latter. I followed the Discord Developer Getting Started, and was building off the example app it had.
Amgelo
Amgelo•2d ago
that guide is written by discord assuming you handle requests in raw (with almost no discord-specific libraries), which is what discordjs/core also does pretty much if you're using the entire djs you don't need to use that, it provides easy to use wrappers
d.js docs
d.js docs•2d ago
:guide: Home: Introduction read more
Amgelo
Amgelo•2d ago
you should be following this guide instead, it's the official djs guide
Izzibaby
Izzibaby•2d ago
Alrighty 😅 So it'll be easier for me to do that, versus the core method?
Amgelo
Amgelo•2d ago
discordjs/core is a minimal wrapper for the rest and gateway apis discord.js uses core and other libraries to provide higher level wrappers that are easier to use
Izzibaby
Izzibaby•2d ago
Alright. I know it did look confusing seeing the difference between
// Simple test command
const TEST_COMMAND = {
name: 'testing',
description: 'Basic command to Test Stuff',
type: 1,
integration_types: [0, 1],
contexts: [0, 1, 2],
};
// Simple test command
const TEST_COMMAND = {
name: 'testing',
description: 'Basic command to Test Stuff',
type: 1,
integration_types: [0, 1],
contexts: [0, 1, 2],
};
and
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction) {
await interaction.reply('Pong!');
},
};
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction) {
await interaction.reply('Pong!');
},
};
Regarding slash commands. Time to ignore most of what I spent the last 6 hours reading over and learning 😂 Time to figure this all out now.
Amgelo
Amgelo•2d ago
well you could argue that it's useful to know how the library/api works at a lower level though it's not something most devs need to know
Want results from more Discord servers?
Add your server