mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Merge pull request #276 from metal0/invite-types
DJS Temporary fix for school hub invites
This commit is contained in:
commit
de3b4bbbef
1 changed files with 19 additions and 18 deletions
|
@ -65,32 +65,33 @@ export async function getInviteInfoEmbed(
|
|||
`),
|
||||
inline: true,
|
||||
});
|
||||
if (invite.channel) {
|
||||
const channelName =
|
||||
invite.channel.type === ChannelTypeStrings.VOICE ? `🔉 ${invite.channel.name}` : `#${invite.channel.name}`;
|
||||
|
||||
const channelName =
|
||||
invite.channel.type === ChannelTypeStrings.VOICE ? `🔉 ${invite.channel.name}` : `#${invite.channel.name}`;
|
||||
const channelCreatedAtTimestamp = snowflakeToTimestamp(invite.channel.id);
|
||||
const channelCreatedAt = moment.utc(channelCreatedAtTimestamp, "x");
|
||||
const channelAge = humanizeDuration(Date.now() - channelCreatedAtTimestamp, {
|
||||
largest: 2,
|
||||
round: true,
|
||||
});
|
||||
|
||||
const channelCreatedAtTimestamp = snowflakeToTimestamp(invite.channel.id);
|
||||
const channelCreatedAt = moment.utc(channelCreatedAtTimestamp, "x");
|
||||
const channelAge = humanizeDuration(Date.now() - channelCreatedAtTimestamp, {
|
||||
largest: 2,
|
||||
round: true,
|
||||
});
|
||||
|
||||
let channelInfo = trimLines(`
|
||||
let channelInfo = trimLines(`
|
||||
Name: **${channelName}**
|
||||
ID: \`${invite.channel.id}\`
|
||||
Created: **${channelAge} ago**
|
||||
`);
|
||||
|
||||
if (invite.channel.type !== ChannelTypeStrings.VOICE) {
|
||||
channelInfo += `\nMention: <#${invite.channel.id}>`;
|
||||
}
|
||||
if (invite.channel.type !== ChannelTypeStrings.VOICE) {
|
||||
channelInfo += `\nMention: <#${invite.channel.id}>`;
|
||||
}
|
||||
|
||||
embed.fields.push({
|
||||
name: preEmbedPadding + "Channel information",
|
||||
value: channelInfo,
|
||||
inline: true,
|
||||
});
|
||||
embed.fields.push({
|
||||
name: preEmbedPadding + "Channel information",
|
||||
value: channelInfo,
|
||||
inline: true,
|
||||
});
|
||||
}
|
||||
|
||||
if (invite.inviter) {
|
||||
embed.fields.push({
|
||||
|
|
Loading…
Add table
Reference in a new issue