3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-11 13:07:20 +00:00

Add support for server-specific timezone and date format settings

This commit is contained in:
Dragory 2020-08-10 00:24:06 +03:00
parent 4c9b5778b2
commit 8bd1572e2a
51 changed files with 326 additions and 168 deletions

View file

@ -43,7 +43,7 @@ export async function getInviteInfoEmbed(
}
const serverCreatedAtTimestamp = snowflakeToTimestamp(invite.guild.id);
const serverCreatedAt = moment(serverCreatedAtTimestamp, "x");
const serverCreatedAt = moment.utc(serverCreatedAtTimestamp, "x");
const serverAge = humanizeDuration(Date.now() - serverCreatedAtTimestamp, {
largest: 2,
round: true,
@ -66,7 +66,7 @@ export async function getInviteInfoEmbed(
: `#${invite.channel.name}`;
const channelCreatedAtTimestamp = snowflakeToTimestamp(invite.channel.id);
const channelCreatedAt = moment(channelCreatedAtTimestamp, "x");
const channelCreatedAt = moment.utc(channelCreatedAtTimestamp, "x");
const channelAge = humanizeDuration(Date.now() - channelCreatedAtTimestamp, {
largest: 2,
round: true,
@ -117,7 +117,7 @@ export async function getInviteInfoEmbed(
}
const channelCreatedAtTimestamp = snowflakeToTimestamp(invite.channel.id);
const channelCreatedAt = moment(channelCreatedAtTimestamp, "x");
const channelCreatedAt = moment.utc(channelCreatedAtTimestamp, "x");
const channelAge = humanizeDuration(Date.now() - channelCreatedAtTimestamp, {
largest: 2,
round: true,