Ugh
PS C:\Users\crazy\OneDrive\Desktop\sunset lodge bot> node .
Ready!
Bot is Now Online & Working Fine
Successfully registered application commands.
DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (C:\Users\crazy\OneDrive\Desktop\sunset lodge bot\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (C:\Users\crazy\OneDrive\Desktop\sunset lodge bot\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
at async CommandInteraction.reply (C:\Users\crazy\OneDrive\Desktop\sunset lodge bot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:99:5)
at async Object.execute (C:\Users\crazy\OneDrive\Desktop\sunset lodge bot\events\interactionCreate.js:7:13) {
method: 'post',
path: '/interactions/970069776091193375/aW50ZXJhY3Rpb246OTcwMDY5Nzc2MDkxMTkzMzc1OjV2VFRMeTVlYnBQOWN4WFZ4Y0VzTUM1aDBuUTZhT0xJVk9FdlJmb2tPZGtyMGpGczFST3hsQUNkRWF5OTRJRW5hZG80eWZmMnp0UFJvc3FYNnhEc0UxUm1nbkRvT0V3cFYyNFhBdXFXZURGOGlOekl4R01oZ21xa3VJM0l0UDBD/callback',
code: 50006,
httpStatus: 400,
requestData: { json: { type: 4, data: [Object] }, files: [] }
}
C:\Users\crazy\OneDrive\Desktop\sunset lodge bot\node_modules\discord.js\src\rest\RequestHandler.js:350
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Unknown interaction
at RequestHandler.execute (C:\Users\crazy\OneDrive\Desktop\sunset lodge bot\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (C:\Users\crazy\OneDrive\Desktop\sunset lodge bot\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
at async CommandInteraction.reply (C:\Users\crazy\OneDrive\Desktop\sunset lodge bot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:99:5) {
method: 'post',
path: '/interactions/970069776091193375/aW50ZXJhY3Rpb246OTcwMDY5Nzc2MDkxMTkzMzc1OjV2VFRMeTVlYnBQOWN4WFZ4Y0VzTUM1aDBuUTZhT0xJVk9FdlJmb2tPZGtyMGpGczFST3hsQUNkRWF5OTRJRW5hZG80eWZmMnp0UFJvc3FYNnhEc0UxUm1nbkRvT0V3cFYyNFhBdXFXZURGOGlOekl4R01oZ21xa3VJM0l0UDBD/callback',
code: 10062,
httpStatus: 404,
requestData: {
json: {
type: 4,
data: {
content: 'An error occured while trying to execute this command!',
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 64,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
}
},
files: []
}
}
Node.js v17.7.1
const { SlashCommandBuilder } = require('@discordjs/builders');
const { MessageEmbed } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('test')
.setDescription('testing'),
async execute(interaction) {
const exampleEmbed = new MessageEmbed()
.setColor('#0099ff')
.setTitle('Some title')
.setURL('https://discord.js.org/')
.setAuthor({ name: 'Some name', iconURL: 'https://i.imgur.com/AfFp7pu.png', url: 'https://discord.js.org' })
.setDescription('Some description here')
.setThumbnail('https://i.imgur.com/AfFp7pu.png')
.addFields(
{ name: 'Regular field title', value: 'Some value here' },
{ name: '\u200B', value: '\u200B' },
{ name: 'Inline field title', value: 'Some value here', inline: true },
{ name: 'Inline field title', value: 'Some value here', inline: true },
)
. addField('Inline field title', 'Some value here', true)
.setImage('https://i.imgur.com/AfFp7pu.png')
.setTimestamp()
.setFooter({ text: 'Some footer text here', iconURL: 'https://i.imgur.com/AfFp7pu.png' });
return interaction.reply({ embed: exampleEmbed, ephemeral: true });
},
};