From 03feb6d3aee8d40a5b166317261bf300fc36173b Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Mon, 10 Oct 2022 13:42:02 -0600 Subject: [PATCH] utility.presence: null check custom status emotes try 2 --- src/modules/utility.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index deece41..2919d2f 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -728,12 +728,14 @@ presence.callback = async function (msg, line) { const activity = target.presence.activities[index]; if (activity.type == 4) { let emote = ""; - if (activity.emoji?.id) { - emote = `<${activity.emoji.animated ? "a" : ""}:${ - activity.emoji.name - }:${activity.emoji.id}>`; - } else { - emote = activity.emoji.name; + if (activity.emoji) { + if (activity.emoji.id) { + emote = `<${activity.emoji.animated ? "a" : ""}:${ + activity.emoji.name + }:${activity.emoji.id}>`; + } else { + emote = activity.emoji.name; + } } embeds.push({