mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 15:00:00 +00:00
show created timestamp and sticker info on server info
This commit is contained in:
parent
afe0ec1194
commit
e12f37bb6a
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { CategoryChannel, MessageEmbedOptions, Snowflake, TextChannel, VoiceChannel } from "discord.js";
|
import { CategoryChannel, MessageEmbedOptions, Snowflake, SnowflakeUtil, TextChannel, VoiceChannel } from "discord.js";
|
||||||
import humanizeDuration from "humanize-duration";
|
import humanizeDuration from "humanize-duration";
|
||||||
import { GuildPluginData } from "knub";
|
import { GuildPluginData } from "knub";
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
|
@ -50,7 +50,7 @@ export async function getServerInfoEmbed(
|
||||||
|
|
||||||
// BASIC INFORMATION
|
// BASIC INFORMATION
|
||||||
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
|
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
|
||||||
const createdAt = moment.utc((guildPreview || restGuild)!.id, "x"); // FIXME ID -> Timestamp
|
const createdAt = moment.utc(SnowflakeUtil.deconstruct((guildPreview || restGuild)!.id).timestamp, "x");
|
||||||
const tzCreatedAt = requestMemberId
|
const tzCreatedAt = requestMemberId
|
||||||
? await timeAndDate.inMemberTz(requestMemberId, createdAt)
|
? await timeAndDate.inMemberTz(requestMemberId, createdAt)
|
||||||
: timeAndDate.inGuildTz(createdAt);
|
: timeAndDate.inGuildTz(createdAt);
|
||||||
|
@ -194,7 +194,7 @@ export async function getServerInfoEmbed(
|
||||||
}[restGuild.premiumTier] || 0;
|
}[restGuild.premiumTier] || 0;
|
||||||
|
|
||||||
otherStats.push(`Emojis: **${restGuild.emojis.cache.size}** / ${maxEmojis * 2}`);
|
otherStats.push(`Emojis: **${restGuild.emojis.cache.size}** / ${maxEmojis * 2}`);
|
||||||
otherStats.push(`Stickers: ? / ${maxStickers}`); // Wait on DJS: **${restGuild.stickers.cache.size}**
|
otherStats.push(`Stickers: **${restGuild.stickers.cache.size}** / ${maxStickers}`);
|
||||||
} else {
|
} else {
|
||||||
otherStats.push(`Emojis: **${guildPreview!.emojis.size}**`);
|
otherStats.push(`Emojis: **${guildPreview!.emojis.size}**`);
|
||||||
// otherStats.push(`Stickers: **${guildPreview!.stickers.size}**`); Wait on DJS
|
// otherStats.push(`Stickers: **${guildPreview!.stickers.size}**`); Wait on DJS
|
||||||
|
|
Loading…
Add table
Reference in a new issue