So in this embed code i just wrote, even when i tried everything, just cannot use anything other than client.user.tag
which pings my bot but i want it to ping me.
here’s the code:
const Discord = require('discord.js');
exports.run = (client, message, params) => {
const embed = new Discord.RichEmbed()
.setAuthor(client.user.username, client.user.displayAvatarURL)
.addField("Owners", `${client.users.fetch("id").tag}`,true) //Problem is here.
.addField("Website", "Coming Soon!",true)
.addField("Vote!", "Coming Soon!",true)
.setColor("RANDOM")
message.channel.send(embed)
}
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: 0,
category: 'bot'
}
exports.help = {
command: 'info',
desc: 'Show bot infos.',
usage: 'info'
}
but it gave me “TypeError: client.users.fetch is not a function”
for alternatives, i tried:
client.application.owner
didn’t work, gave “TypeError: Cannot read properties of undefined (reading ‘owner’)”
client.users.get("id").tag
didn’t work, gave “TypeError: Cannot read properties of undefined (reading ‘tag’)”
but when i try client.user.tag
or something after “user.”, code actually works but as you can guess, it pings itself which not im looking for.
Ernedhir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.