From e2bcdb6adc2f5a206a31fc9a6b30073dc7194c72 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Mon, 29 May 2023 20:16:36 -0600 Subject: [PATCH] utility.lookinvite: fix missing name and add member count forgot to add with_counts to my test url so didnt realize fields were there for those --- src/modules/utility.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index 68ad353..cc33d83 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -514,7 +514,17 @@ lookupinvite.callback = async function (msg, line) { embed.fields.push( { name: "Channel", - value: `**${invite.channel.name}** (${invite.channel.id})`, + value: `**${ + invite.channel.name ?? + invite.channel.recipients + .map((member) => member.username) + .join(", ") + }** (${invite.channel.id})`, + inline: true, + }, + { + name: "Member Count", + value: `${STATUS_ICONS.offline}${invite.approximate_member_count} members`, inline: true, }, expires