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

140
Visualizações
Trying to code a discord bot that shows the status of my minecraft server but the bot isn't responding to the command not even with an error
const {Client, RichEmbed, Intents, MessageEmbed } = require('discord.js'); 

 
const bot = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
 
 
const token = 'token is a secret';
 
const PREFIX = '!';
 
bot.on('ready', () =>{
    console.log('Bot has come online.');
});
 
bot.on('messageCreate', message =>{
 
    
    let args = message.content.substring(PREFIX.length).split(' ')
 
    switch(args[0]){
        case 'mc':
            
            const ping = require('minecraft-server-util')
 
 
            ping.status('ip', { port: port})
             .then((response)=>{
                
                const Embed = new MessageEmbed()
                .setTitle('Server Status', )
                .addField('Server IP', response.host)
                .addField('Server Version', response.version)
                .addField('Online Players', response.onlinePlayers)
                .addField('Max Players', response.maxPlayers)
                
                message.channel.send({ embeds: [Embed] });
            })
            .catch((error)=>{console.error(error);});
        break
 
    }
 
    })
 
bot.login(token);

I am coding a discord bot that sends the status of my minecraft server when the assigned command is issued. But for some reason it is not able to create the embed. This is the error i am getting: RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings. Please tell me where i have gone wrong and how should i correct it.

about 4 years ago · Juan Pablo Isaza
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