Mi bot no está enviando la inserción que codifiqué. ¿Hay algún problema en el código que tengo? He estado trabajando en esto durante 2 días y todavía me está dando problemas.
Principal.js:
const Discord = require('discord.js'); const client = new Discord.Client({ intents: ["GUILDS"] }, {partials: ["MESSAGE", "CHANNEL", "REACTION"]}); const prefix = '!'; const fs = require('fs'); client.commands = new Discord.Collection(); const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); for(const file of commandFiles){ const command = require(`./commands/${file}`); client.commands.set(command.name, command); } client.once('ready', () => { console.log('Bot is online'); }); client.on('message', message => { if(!message.content.startsWith(prefix) || message.author.bot) return; const args = message.content.slice(prefix.length).split(/ +/); const command = args.shift().toLowerCase(); if(command === 'website'){ client.commands.get('website').execute(message, args, Discord, client); } });Código de inserción:
module.exports = { name: 'website', description: "website", execute(message, args, Discord){ const newEmbed = new Discord.MessageEmbed() .setColor('#ff0000') .setTitle('WEBSITE') .setURL('https://brodydurrett2.wixsite.com/teamban') message.channel.send(newEmbed); } }