Not a single command working

Not a single command of my bot is working , anyone knows what i gotta do to fix it ? no errors in console ttho
7 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP2y ago
code from embed
const {
SlashCommandBuilder,
EmbedBuilder,
PermissionFlagsBits,
} = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
.setName("embed")
.setDescription("Cria um embed.")
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
.addStringOption((option) =>
option
.setName("titulo")
.setDescription("Titulo do embed.")
.setRequired(true)
)
.addStringOption((option) =>
option
.setName("descricao")
.setDescription("Descrição do embed.")
.setRequired(true)
)
.addStringOption((option) =>
option
.setName("cor")
.setDescription("Cor do embed , deve estar no modelo HEX Color.")
.setRequired(true)
),



async execute(interaction) {
const {channel, options} = interaction;
const title = options.getString("titulo");
const description = options.getString("descricao");
const color = options.getString("cor");

const embed = new EmbedBuilder()
.setTitle(title)
.setDescription(description)
.setColor(color);

const EmbedSend = await channel.send({ embeds: [embed] });

interaction.reply({ content: "Embed foi mandado", ephemeral: true });
},
};
const {
SlashCommandBuilder,
EmbedBuilder,
PermissionFlagsBits,
} = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
.setName("embed")
.setDescription("Cria um embed.")
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
.addStringOption((option) =>
option
.setName("titulo")
.setDescription("Titulo do embed.")
.setRequired(true)
)
.addStringOption((option) =>
option
.setName("descricao")
.setDescription("Descrição do embed.")
.setRequired(true)
)
.addStringOption((option) =>
option
.setName("cor")
.setDescription("Cor do embed , deve estar no modelo HEX Color.")
.setRequired(true)
),



async execute(interaction) {
const {channel, options} = interaction;
const title = options.getString("titulo");
const description = options.getString("descricao");
const color = options.getString("cor");

const embed = new EmbedBuilder()
.setTitle(title)
.setDescription(description)
.setColor(color);

const EmbedSend = await channel.send({ embeds: [embed] });

interaction.reply({ content: "Embed foi mandado", ephemeral: true });
},
};
deminearchiver
How do you handle your commands? do you an interaction event?
d.js docs
d.js docs2y ago
Documentation suggestion for @ashurabln:event (event) Client#interactionCreate Emitted when an interaction is created. Suggestion for @ashurabln:guide Creating Your Bot: Command handling read more
Ashura
AshuraOP2y ago
i got a command handler and an interactiton create
deminearchiver
Are your files properly handled?
Ashura
AshuraOP2y ago
Yep
Want results from more Discord servers?
Add your server