#Application not awnsering

22 messages · Page 1 of 1 (latest)

tranquil kindle
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

stray cradle
#
module.exports = {
data: new SlashCommandBuilder()
    .setName('create')
    .setDescription('Cria uma ficha de Breed'),
    async execute(interaction) {
        const open_embed = new MessageEmbed()
            .setTitle('Status')
            .setDescription('Escolha os status do dino que sera breedado , clique nos botões somente 1 vez.')
            .setColor('#f20505');
        const actions = new MessageActionRow()
            .addComponents(
                new MessageButton()
                .setCustomId('health')
                .setLabel(':Health: Health')
                .setStyle('SECONDARY'),
                new MessageButton()
                .setCustomId('stamina')
                .setLabel(':Stamina: Stamina')
                .setStyle('SECONDARY'),
                new MessageButton()
                .setCustomId('melee')
                .setLabel(':Melee: Melee')
                .setStyle('SECONDARY'),
                new MessageButton()
                .setCustomId('continue')
                .setLabel('✅ Continuar')
                .setStyle('SUCCESS'),
                new MessageButton()
                .setCustomId('cancelar')
                .setLabel('⛔ Cancelar')
                .setStyle('DANGER')

            );
         },

    };
tranquil wadiBOT
#

Suggestion for @stray cradle:
guide Slash Commands: Command response methods
The most common way of sending a response is by using the ChatInputCommandInteraction#reply() method, as you have done in earlier examples. This method acknowledges the interaction and sends a new message in response.
read more

stray cradle
#

so , how do i integrate the ChatInputCommandInteraction#reply() in my code?

tawny fossil
#

You should always response to interactions

stray cradle
#

const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('create')
.setDescription('Cria uma ficha de Breed'),
async execute(ChatInputCommandInteraction) {
const open_embed = new MessageEmbed()
.setTitle('Status')
.setDescription('Escolha os status do dino que sera breedado , clique nos botões somente 1 vez.')
.setColor('#f20505');
const actions = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('health')
.setLabel(':Health: Health')
.setStyle('SECONDARY'),
new MessageButton()
.setCustomId('stamina')
.setLabel(':Stamina: Stamina')
.setStyle('SECONDARY'),
new MessageButton()
.setCustomId('melee')
.setLabel(':Melee: Melee')
.setStyle('SECONDARY'),
new MessageButton()
.setCustomId('continue')
.setLabel('✅ Continuar')
.setStyle('SUCCESS'),
new MessageButton()
.setCustomId('cancelar')
.setLabel('⛔ Cancelar')
.setStyle('DANGER')

        );
     },

};
#

like this?

stray cradle
tawny fossil
#

No, that is syntax error

#

interaction is your ChatInputCommandInteraction

tranquil wadiBOT
#

Explaining <Class> and Class#method notation: learn more

stray cradle
#

kk , but where in my code do i place ChatInputCommandInteraction

stray cradle
naive wind
stray cradle
#

tried a lot of things with it but it just wont work

#

it just says it isnt awnsering

naive wind
#

Use console logs to see if your execute function is being called or not

#

If it's not, then the problem is probably in a handler

stray cradle
#

didnt call anything out

stray cradle
#

@naive wind you know how i can make this code