From b313bb9f4510a7852a33d8aa717cf11a116ec8bc Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Sun, 9 Apr 2023 11:24:38 -0600 Subject: [PATCH] utility.linvite: fix welcome screen --- src/modules/utility.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index cb0493d..28bd868 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -348,18 +348,20 @@ lookupinvite.callback = async function (msg, line) { value: `${STATUS_ICONS.online}${invite.approximate_presence_count} online\t\t${STATUS_ICONS.offline}${invite.approximate_member_count} members`, inline: false, }, - invite.welcome_screen && { + invite.guild.welcome_screen && { name: "Welcome Screen", value: `"${ - invite.welcome_screen.description - }"\n${invite.welcome_screen.welcome_channels.map( - (c) => - `${ - c.emoji_id - ? `[:${c.emoji_name}:](${EMOTE_BASE}${c.emoji_id}.webp)` - : c.emoji_name - } ${c.description} \`(${c.channel_id})\`` - )}`, + invite.guild.welcome_screen.description + }"\n${invite.guild.welcome_screen.welcome_channels + .map( + (c) => + `${ + c.emoji_id + ? `[:${c.emoji_name}:](${EMOTE_BASE}${c.emoji_id}.webp)` + : c.emoji_name + } ${c.description} \`(${c.channel_id})\`` + ) + .join("\n")}`, inline: false, }, {