check if "channel" exists

This commit is contained in:
metal 2021-09-04 09:37:58 +00:00 committed by GitHub
parent 7f2731262d
commit 2821252a5a

View file

@ -65,7 +65,7 @@ export async function getInviteInfoEmbed(
`),
inline: true,
});
if (invite.channel) {
const channelName =
invite.channel.type === ChannelTypeStrings.VOICE ? `🔉 ${invite.channel.name}` : `#${invite.channel.name}`;
@ -91,6 +91,7 @@ export async function getInviteInfoEmbed(
value: channelInfo,
inline: true,
});
}
if (invite.inviter) {
embed.fields.push({