utility.presence: fix

This commit is contained in:
Cynthia Foxwell 2023-01-22 13:15:54 -07:00
parent b9f03bcf64
commit 31db6f8408

View file

@ -713,8 +713,8 @@ presence.callback = async function (msg, line) {
if (!target.presence) return `**${target.username}#${target.discriminator}** is offline.`; if (!target.presence) return `**${target.username}#${target.discriminator}** is offline.`;
let icons = ""; let icons = "";
for (const platform in target.presence.client_status) { for (const platform of Object.keys(target.clientStatus)) {
const status = target.presence.client_status[platform]; const status = target.clientStatus[platform];
icons += PRESENCE_ICONS[platform][status] + " "; icons += PRESENCE_ICONS[platform][status] + " ";
} }
@ -722,8 +722,8 @@ presence.callback = async function (msg, line) {
const embeds = []; const embeds = [];
const files = []; const files = [];
for (const index in target.presence.activities) { for (const index in target.activities) {
const activity = target.presence.activities[index]; const activity = target.activities[index];
if (activity.type == 4) { if (activity.type == 4) {
const embed = {}; const embed = {};