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

117
Views
AssertionError [ERR_ASSERTION]: Expected 'options' to be an 'object' or 'undefined', got 'function'
const client = require("../index");
const { queryFull} = require('minecraft-server-util');
const { MessageEmbed } = require('discord.js')

function updateEmbed() {
    queryFull('sega.mcpe.lol', 19132, async (error, data) => {
        let embedStatus = new MessageEmbed();
        embedStatus.setTitle("Sega Network stats")
        embedStatus.addFields([
            {
                'name': 'Players',
                'value': `${data.players.online} / ${data.players.max}`,
                'inline': false
            },
            {
                "name": "Players List",
                "value": `${data.players.list.join(', ')}`,
                "inline": true
            },
            {
                "name": "Informations",
                "value": `
                Server IP: sega.mcpe.lol
                Server Port: ${data.hostPort}
                Server MOTD: ${data.motd.raw}
                Server Version: ${data.version}
                `
            }

        ])
        embedStatus.setFooter({text: "Message edit everyone 5 seconds!"});
        const cha = client.channels.cache.get('804736681621454900')
        const msgg = await cha.messages.cache.get('949332631491870791')            

        msgg.edit({embeds: [embedStatus]})
    })
}

client.once('ready', ()=>{
    console.log("Bot is Active!");
    setInterval(updateEmbed(), 60000)
});

Hi, i am trying to make mc server stats that update embed message every (discord.js) 1 minutes, and its return this error. i did't what this error means, if anyone know answer than please answer

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