Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda