utility.presence: null check custom status emotes try 2

This commit is contained in:
Cynthia Foxwell 2022-10-10 13:42:02 -06:00
parent cb4dee574d
commit 03feb6d3ae

View file

@ -728,12 +728,14 @@ presence.callback = async function (msg, line) {
const activity = target.presence.activities[index]; const activity = target.presence.activities[index];
if (activity.type == 4) { if (activity.type == 4) {
let emote = ""; let emote = "";
if (activity.emoji?.id) { if (activity.emoji) {
emote = `<${activity.emoji.animated ? "a" : ""}:${ if (activity.emoji.id) {
activity.emoji.name emote = `<${activity.emoji.animated ? "a" : ""}:${
}:${activity.emoji.id}>`; activity.emoji.name
} else { }:${activity.emoji.id}>`;
emote = activity.emoji.name; } else {
emote = activity.emoji.name;
}
} }
embeds.push({ embeds.push({