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

146
Views
Owner Name and Region return undefined - Discord v13

So as of now... I can only seem to get the server owners Id with the guild.ownerId string, how can I go about getting the owners username or tag as well? and how to fix the region returning undefined?

const { MessageEmbed } = require("discord.js");
const config = require("../../botconfig");

module.exports = {
    name: "serverinfo",
    aliases: ["si", "server-info", "server-Info"],
    description: "Shows info on a server!",
    usage: `serverinfo`,
  run: async (client, message, args) => {
    const inline = true;
          
    let members = message.guild.memberCount;
    
    const siEmbed = new MessageEmbed()
    .setAuthor(message.guild.name, message.guild.iconURL())
    .setThumbnail(message.guild.iconURL())
    .addField("Server Created", `<t:${~~(message.channel.guild.createdAt / 1000)}:R>`, true)
    .addField("Server Owner", `• \`${message.guild.owner} (${message.guild.ownerId})\``, inline)
    .addField("Region", `• \`${message.guild.region}\``, inline)
    .addField("Total Members", `• \`${members.toLocaleString()}\``, inline)
    .addField("Text Channels", `• \`${message.guild.channels.cache.size}\``, inline)
    .addField("Voice Channels", `• \`${message.guild.channels.cache.filter(ch => ch.type === "voice").size}\``, inline)
    .addField("Total Roles", `• \`${message.guild.roles.cache.size}\``, inline)
    .setColor("#FFA500")
    .setFooter(`Server ID: ${message.guild.id}`)
    .setTimestamp()

    message.reply({ embeds: [siEmbed] });
  }
};
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

To get server owner in djs v13 you need to use guild.fetchOwner() method:

let owner = await message.guild.fetchOwner()
console.log(owner)
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!