Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
Actualmente estoy tratando de escribir un código de envío con discord.js pero no puedo hacerlo funcionar

Cuando ejecuto el bot en Visual Studio Code y funciona normalmente, todos los demás comandos, pero cuando intento ejecutar este comando de envío, no sucede nada, mi bot no envía nada y VS Code no me envía ningún error.

 const Discord = require('discord.js'); require('discord-reply'); const getMember = require('functions.js') const bot = new Discord.Client(); bot.on('ready', () => { console.log('hello mother') bot.user.setActivity('bia info') }); module.exports.run = async (bot, message, args, prefix) => { bot.on('message', (message) => { if (message.content == 'bia ship') { let user = message.mentions.users.first() let RN = Math.floor(Math.random() * 100) const UnLoveEmbed = new Discord.MessageEmbed() .setColor('#A14EFF') .setTitle('Uhm.. There is not a match. 💔 😭') .setDescription(`'${message.author} shipped with ${user} gives ${RN}%'`) const LoveEmbed = new Discord.MessageEmbed() .setColor('#A14EFF') .setTitle('Looks like we have a couple here! 💖 😍') .setDescription(`${message.author} shipped with ${user} gives ${RN}%`) if (RN > 50) { message.channel.send(LoveEmbed) } else { if (RN < 50) { message.channel.send(UnLoveEmbed) } } }} )};
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Creo que en DiscordJS v13, debe especificar que está enviando una inserción como esta:

 channel.send({ embeds: [ExampleEmbed] });

Entonces en tu caso:

 message.channel.send({ embeds: [LoveEmbed] }); //In stead of: message.channel.send(LoveEmbed);

Fuente

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!