Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
I am currently trying to write a ship code with discord.js but i can't get it to work

When I run the bot on Visual Studio Code and it goes normally, every other command, but when I try to run this ship command nothing happens, my bot doesn't send nothing and VS Code doesn't send me any errors.

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 Respostas
Responde à pergunta

0

I believe that in DiscordJS v13, you have to specify you're sending an embed like this:

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

So in your case:

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

Source

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda