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 ddbbc543c2
commit c67a1df11d
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
51 changed files with 326 additions and 168 deletions

View file

@ -6,6 +6,7 @@ import humanizeDuration from "humanize-duration";
import LCL from "last-commit-log";
import path from "path";
import moment from "moment-timezone";
import { getGuildTz } from "../../../utils/timezones";
export const AboutCmd = utilityCmd({
trigger: "about",
@ -29,7 +30,7 @@ export const AboutCmd = utilityCmd({
let version;
if (lastCommit) {
lastUpdate = moment(lastCommit.committer.date, "X").format("LL [at] H:mm [(UTC)]");
lastUpdate = moment.utc(lastCommit.committer.date, "X").format("LL [at] H:mm z");
version = lastCommit.shortHash;
} else {
lastUpdate = "?";
@ -49,6 +50,7 @@ export const AboutCmd = utilityCmd({
["Last update", lastUpdate],
["Version", version],
["API latency", `${shard.latency}ms`],
["Server timezone", getGuildTz(pluginData)],
];
const loadedPlugins = Array.from(