#Application not awnsering
22 messages · Page 1 of 1 (latest)
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')
);
},
};
Suggestion for @stray cradle:
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
so , how do i integrate the ChatInputCommandInteraction#reply() in my code?
You should always response to interactions
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?
kk
Explaining <Class> and Class#method notation: learn more
kk , but where in my code do i place ChatInputCommandInteraction
so i can understand it better
interaction is the variable identifier
ChatInputCommandInteraction is its type
kk
tried a lot of things with it but it just wont work
it just says it isnt awnsering
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
its probably in the handler
didnt call anything out
@naive wind you know how i can make this code