Home > Net >  Discord.js v13 error: RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty st
Discord.js v13 error: RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty st

Time:06-10

I'm working on a userinfo command in discord.js v13 and I don't know how to fix this error

ERROR:

[Photo Error]: https://i.stack.imgur.com/71eWe.png

if (typeof data !== 'string') throw new error(errorMessage);
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.



const { MessageEmbed } = require("discord.js")

module.exports = {
  name: "serverinfo",
  description: 'Gives Info About A Server',

  run: async (client, message, args) => {
    const { guild } = message
    const icon = message.guild.iconURL() // Icon Of Server
    const roles = message.guild.roles.cache.map(e => e.toString()) // Roles Of Server
    const emojis = message.guild.emojis.cache.map(e => e.toString()) // Emojis Of Server
    const emojicount = message.guild.emojis.cache
    const members = message.guild.members.cache // Members In Server
    const create = message.guild.createdAt.toLocaleDateString() // Server Create Date 

    let embed = new MessageEmbed()
      .setColor('RANDOM')
      .setTitle('Server Info')
      .setThumbnail(`${icon}`)
      .addField('Server Onwer:-', guild.owner)
      .addField('Server ID:-', guild.id)
      .addField('Server Creation Date:-', create)
      .addField('Boost Count:-', guild.premiumSubscriptionCount)
      .addField('Boost Level:-', guild.premiumTier)
      // You Can Add Any Emoji
      .addField('Member Count:-', `${members.size}\n${members.filter(member => !member.user.bot).size}(Human)\n${members.filter(member => member.user.bot).size}(BOT)`)
      .addField('Mmeber Stats:-', `${guild.members.cache.filter(member => member.presence.status == 'online').size}:-           
  • Related