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) {
|
} else if (invite.type == 1) {
|
||||||
embed.title += " (Group DM)";
|
embed.title += " (Group DM)";
|
||||||
embed.fields.push(
|
embed.fields.push(
|
||||||
{
|
...[
|
||||||
name: "Channel",
|
{
|
||||||
value: `**${
|
name: "Channel",
|
||||||
invite.channel.name ??
|
value: `**${
|
||||||
invite.channel.recipients
|
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)
|
.map((member) => member.username)
|
||||||
.join(", ")
|
.join(", "),
|
||||||
}** (${invite.channel.id})`,
|
inline: false,
|
||||||
inline: false,
|
},
|
||||||
},
|
expires,
|
||||||
{
|
inviter,
|
||||||
name: "Member Count",
|
].filter((x) => !!x)
|
||||||
value: `${STATUS_ICONS.offline}${invite.approximate_member_count} members`,
|
|
||||||
inline: true,
|
|
||||||
},
|
|
||||||
expires,
|
|
||||||
inviter
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const groupIcon = invite.channel.icon
|
const groupIcon = invite.channel.icon
|
||||||
|
|
Loading…
Reference in a new issue