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

254
Views
El bot de Discord no puede crear el RangeError incrustado [EMBED_FIELD_VALUE]: los valores del campo MessageEmbed deben ser cadenas no vacías
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);

Estoy codificando un bot de discordia que envía el estado de mi servidor de Minecraft cuando se emite el comando asignado. Pero por alguna razón no puede crear la inserción. Este es el error que recibo: RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings . Traté de buscar en Google este error pero no pude entender claramente. Por favor, dígame dónde me he equivocado y cómo debo corregirlo. :(

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Prueba esto:

 .setTitle('Server Status') .addField('Server IP', `** ** ${response.host}`) .addField('Server Version', `** ** ${response.version}`) .addField('Online Players', `** ** ${response.onlinePlayers}`) .addField('Max Players', `** ** ${response.maxPlayers}`)
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!