userinfo: ignore nitro badge if bot, emote name fixes, add offline status
This commit is contained in:
parent
998d1fe6fb
commit
a387eb9b2a
2 changed files with 22 additions and 15 deletions
|
@ -57,7 +57,7 @@ userinfo.callback = async function (msg, line) {
|
||||||
member = guild.members.get(id);
|
member = guild.members.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: horrible, probably needs to be moved out of this function for later
|
// FIXME: horrible, probably needs to be moved out of this command for later
|
||||||
const badges = [];
|
const badges = [];
|
||||||
|
|
||||||
if ((user.flags & UserFlags.STAFF) !== 0) {
|
if ((user.flags & UserFlags.STAFF) !== 0) {
|
||||||
|
@ -96,7 +96,7 @@ userinfo.callback = async function (msg, line) {
|
||||||
if ((user.flags & UserFlags.PREMIUM_EARLY_SUPPORTER) !== 0) {
|
if ((user.flags & UserFlags.PREMIUM_EARLY_SUPPORTER) !== 0) {
|
||||||
badges.push(`[${Icons.badges.early_supporter}](${BadgeURLs.early_supporter})`);
|
badges.push(`[${Icons.badges.early_supporter}](${BadgeURLs.early_supporter})`);
|
||||||
}
|
}
|
||||||
if (user.banner || user.avatar.startsWith("a_")) {
|
if ((user.banner || user.avatar.startsWith("a_")) && !user.bot) {
|
||||||
badges.push(`[${Icons.badges.premium}](${BadgeURLs.premium})`);
|
badges.push(`[${Icons.badges.premium}](${BadgeURLs.premium})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,6 +255,8 @@ userinfo.callback = async function (msg, line) {
|
||||||
descLines.push("");
|
descLines.push("");
|
||||||
if (icons.length > 0) {
|
if (icons.length > 0) {
|
||||||
descLines.push(icons.join(""));
|
descLines.push(icons.join(""));
|
||||||
|
} else {
|
||||||
|
descLines.push(Icons.offline.replace(":i:", ":Offline:"));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const activity of anyMember.activities) {
|
for (const activity of anyMember.activities) {
|
||||||
|
@ -274,7 +276,9 @@ userinfo.callback = async function (msg, line) {
|
||||||
image: {
|
image: {
|
||||||
url: banner,
|
url: banner,
|
||||||
},
|
},
|
||||||
title: `${user.global_name ?? user.username} (${formatUsername(user)}) ${user.bot ? Icons.boat : ""}`,
|
title: `${user.global_name ?? user.username} (${formatUsername(user)}) ${
|
||||||
|
user.bot ? Icons.boat.replace(":i:", ":Bot:") : ""
|
||||||
|
}`,
|
||||||
description: descLines.join("\n"),
|
description: descLines.join("\n"),
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
|
@ -316,6 +320,9 @@ userinfo.callback = async function (msg, line) {
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
].filter((x) => !!x),
|
].filter((x) => !!x),
|
||||||
|
footer: {
|
||||||
|
text: `ID: ${id}`,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
return {embeds: [embed]};
|
return {embeds: [embed]};
|
||||||
|
|
|
@ -426,24 +426,24 @@ module.exports.GuildFeaturesFormatted = {
|
||||||
|
|
||||||
const PRESENCE_ICONS = {
|
const PRESENCE_ICONS = {
|
||||||
desktop: {
|
desktop: {
|
||||||
online: "<:i:1263597847744352397>",
|
online: "<:OnlineDesktop:1263597847744352397>",
|
||||||
idle: "<:i:1263597864089555037>",
|
idle: "<:IdleDesktop:1263597864089555037>",
|
||||||
dnd: "<:i:1263597872268705802>",
|
dnd: "<:DNDDesktop:1263597872268705802>",
|
||||||
},
|
},
|
||||||
mobile: {
|
mobile: {
|
||||||
online: "<:i:1263597896549400647>",
|
online: "<:OnlineMobile:1263597896549400647>",
|
||||||
idle: "<:i:1263597887518937160>",
|
idle: "<:IdleMobile:1263597887518937160>",
|
||||||
dnd: "<:i:1263597880556654672>",
|
dnd: "<:DNDMobile:1263597880556654672>",
|
||||||
},
|
},
|
||||||
web: {
|
web: {
|
||||||
online: "<:i:1263597918841999361>",
|
online: "<:OnlineWeb:1263597918841999361>",
|
||||||
idle: "<:i:1263597912571645983>",
|
idle: "<:IdleWeb:1263597912571645983>",
|
||||||
dnd: "<:i:1263597905776742470>",
|
dnd: "<:DNDWeb:1263597905776742470>",
|
||||||
},
|
},
|
||||||
embedded: {
|
embedded: {
|
||||||
online: "<:i:1263597941051101186>",
|
online: "<:OnlineEmbedded:1263597941051101186>",
|
||||||
idle: "<:i:1263597934252134462>",
|
idle: "<:IdleEmbedded:1263597934252134462>",
|
||||||
dnd: "<:i:1263597927310299208>",
|
dnd: "<:DNDEmbedded:1263597927310299208>",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const OS_ICONS = {
|
const OS_ICONS = {
|
||||||
|
|
Loading…
Reference in a new issue