utility.lookupinvite: add recipients field if gdm has name
This commit is contained in:
parent
778f5aeab1
commit
7a89753875
1 changed files with 25 additions and 16 deletions
|
@ -565,23 +565,32 @@ lookupinvite.callback = async function (msg, line) {
|
|||
} else if (invite.type == 1) {
|
||||
embed.title += " (Group DM)";
|
||||
embed.fields.push(
|
||||
{
|
||||
name: "Channel",
|
||||
value: `**${
|
||||
invite.channel.name ??
|
||||
invite.channel.recipients
|
||||
...[
|
||||
{
|
||||
name: "Channel",
|
||||
value: `**${
|
||||
invite.channel.name ??
|
||||
invite.channel.recipients
|
||||
.map((member) => member.username)
|
||||
.join(", ")
|
||||
}** (${invite.channel.id})`,
|
||||
inline: false,
|
||||
},
|
||||
{
|
||||
name: "Member Count",
|
||||
value: `${STATUS_ICONS.offline}${invite.approximate_member_count} members`,
|
||||
inline: true,
|
||||
},
|
||||
invite.channel.name == null && {
|
||||
name: "Recipients",
|
||||
value: invite.channel.recipients
|
||||
.map((member) => member.username)
|
||||
.join(", ")
|
||||
}** (${invite.channel.id})`,
|
||||
inline: false,
|
||||
},
|
||||
{
|
||||
name: "Member Count",
|
||||
value: `${STATUS_ICONS.offline}${invite.approximate_member_count} members`,
|
||||
inline: true,
|
||||
},
|
||||
expires,
|
||||
inviter
|
||||
.join(", "),
|
||||
inline: false,
|
||||
},
|
||||
expires,
|
||||
inviter,
|
||||
].filter((x) => !!x)
|
||||
);
|
||||
|
||||
const groupIcon = invite.channel.icon
|
||||
|
|
Loading…
Reference in a new issue