Fix uinfo command, discord.js v13 seems to have removed user.presence
This commit is contained in:
parent
8c9c083d26
commit
0bc4277389
|
@ -4,52 +4,54 @@ module.exports = {
|
|||
description: "Gets info about an user, such as ID, Discord Join date and more",
|
||||
syntax: "<User>",
|
||||
|
||||
async execute(client, message, args, config) {
|
||||
const user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author
|
||||
async execute(_0, message, _1, config) {
|
||||
const user = message.mentions.users.first() || message.member;
|
||||
|
||||
await message.channel.send({embeds: [{
|
||||
"title": `Everything you've ever wanted to know about ${user.username}!`,
|
||||
"title": `Everything you've ever wanted to know about ${user.user}!`,
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": message.author.displayAvatarURL(),
|
||||
"text": config.footerTxt
|
||||
},
|
||||
"thumbnail": {
|
||||
"url": user.displayAvatarURL()
|
||||
"url": user.user.displayAvatarURL()
|
||||
},
|
||||
"fields": [
|
||||
|
||||
{
|
||||
"name": "Username",
|
||||
"value": user.username,
|
||||
"value": user.user.username,
|
||||
"inline": true
|
||||
},
|
||||
{
|
||||
"name": "Discriminator",
|
||||
"value": user.discriminator,
|
||||
"value": user.user.discriminator,
|
||||
"inline": true
|
||||
},
|
||||
{
|
||||
"name": "Full Username",
|
||||
"value": user.tag,
|
||||
"value": user.user.tag,
|
||||
"inline": true
|
||||
},
|
||||
{
|
||||
"name": "User Profile Picture",
|
||||
"value": user.displayAvatarURL()
|
||||
"value": user.user.displayAvatarURL()
|
||||
},
|
||||
{
|
||||
"name": "User Status",
|
||||
value: user.presence.status
|
||||
"value": user.presence?.status ?? "Error getting status, does the bot have the GUILD_PRESENCES intent?"
|
||||
//IMPORTANT NOTE:
|
||||
//There seems to be an issue where offline and invisible users return a null presense
|
||||
//I'll try to patch this soon if I can figure out why
|
||||
},
|
||||
{
|
||||
"name": "User ID",
|
||||
"value": `\`${user.id}\``
|
||||
"value": `\`${user.user.id}\``
|
||||
},
|
||||
{
|
||||
"name": "User Joined Discord",
|
||||
"value": user.createdAt,
|
||||
inline: true
|
||||
"value": user.user.createdAt.toString(),
|
||||
"inline": true
|
||||
},
|
||||
]
|
||||
}]});
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
{
|
||||
"prefix": "n!",
|
||||
"token": "IM SO EXCITED ABOUT BURGER",
|
||||
"ownerID": "MY FAVORITE COLOR IS TWELVE",
|
||||
"release": "anitrox_dev",
|
||||
"build": "Stable",
|
||||
"footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2022",
|
||||
"prefix": "n!",
|
||||
"token": "IM SO EXCITED ABOUT BURGER",
|
||||
"ownerID": "MY FAVORITE COLOR IS TWELVE",
|
||||
"release": "anitrox_dev",
|
||||
"build": "Stable",
|
||||
"footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2022",
|
||||
|
||||
"statuses": [
|
||||
"with np!help",
|
||||
"with Sophie!",
|
||||
"Trans Rights!",
|
||||
"in your computer",
|
||||
"with my internet router",
|
||||
"ssh: system64@borkeonv2",
|
||||
"YouTube",
|
||||
"with source code",
|
||||
"Visual Studio Code",
|
||||
"statuses": [
|
||||
"with np!help",
|
||||
"with Sophie!",
|
||||
"Trans Rights!",
|
||||
"in your computer",
|
||||
"with my internet router",
|
||||
"ssh: system64@borkeonv2",
|
||||
"YouTube",
|
||||
"with source code",
|
||||
"Visual Studio Code",
|
||||
"Minecraft",
|
||||
"with the network connections.",
|
||||
"VLC Media Player",
|
||||
|
@ -56,6 +56,7 @@
|
|||
],
|
||||
"intents": [
|
||||
"GUILDS",
|
||||
"GUILD_MESSAGES"
|
||||
"GUILD_MESSAGES",
|
||||
"GUILD_PRESENCES"
|
||||
]
|
||||
}
|
||||
}
|
Reference in New Issue