Undefined variable

.
9 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP3y ago
const { SlashCommandBuilder , EmbedBuilder} = require('discord.js');
const {dinoname} = require('./create.js')

module.exports= {
data: new SlashCommandBuilder()
.setName('set')
.setDescription('Seta os status do dino que sera breedado.')
.addStringOption(option =>
option.setName('status')
.setDescription('Selecione o status que sera modificado.')
.setRequired(true)
.addChoices(
{ name: 'Health', value: 'Health' },
{ name: 'Stamina', value: 'Stamina' },
{ name: 'Melee', value: 'Melee' },
))
.addNumberOption(option =>
option.setName('ammount')
.setDescription('Digite a quantidade do status escolhido.')
.setRequired(true)),
async execute(interaction){
const status = interaction.options.getString('status')
const set = new EmbedBuilder()
.setColor(0x080000)
.setTitle(`\`${dinoname}\` Line`)
.setDescription(`\`${status}\` Foi definido com sucesso!`)
.setAuthor({ name: 'BreedingBot', iconURL: 'https://imgur.com/a/eTunoiM.png'})

await interaction.reply(
{embeds: [set] , ephemeral: true}


)


},

}
const { SlashCommandBuilder , EmbedBuilder} = require('discord.js');
const {dinoname} = require('./create.js')

module.exports= {
data: new SlashCommandBuilder()
.setName('set')
.setDescription('Seta os status do dino que sera breedado.')
.addStringOption(option =>
option.setName('status')
.setDescription('Selecione o status que sera modificado.')
.setRequired(true)
.addChoices(
{ name: 'Health', value: 'Health' },
{ name: 'Stamina', value: 'Stamina' },
{ name: 'Melee', value: 'Melee' },
))
.addNumberOption(option =>
option.setName('ammount')
.setDescription('Digite a quantidade do status escolhido.')
.setRequired(true)),
async execute(interaction){
const status = interaction.options.getString('status')
const set = new EmbedBuilder()
.setColor(0x080000)
.setTitle(`\`${dinoname}\` Line`)
.setDescription(`\`${status}\` Foi definido com sucesso!`)
.setAuthor({ name: 'BreedingBot', iconURL: 'https://imgur.com/a/eTunoiM.png'})

await interaction.reply(
{embeds: [set] , ephemeral: true}


)


},

}
codes of both commands
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP3y ago
const dinoname = interaction.options.getString('dinoname') doesnt it do the trick?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP3y ago
export{dinoname}
export{dinoname}
rry , dummie at js
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP3y ago
kk , just one final question , got any idea why module is mistaken?
Want results from more Discord servers?
Add your server