Typing fixes; show last reload time in !about
This commit is contained in:
parent
2ff93f71db
commit
3e0498f96b
26 changed files with 154 additions and 75 deletions
|
@ -90,8 +90,9 @@ export class UtilityPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
protected archives: GuildArchives;
|
||||
|
||||
protected lastFullMemberRefresh = 0;
|
||||
protected lastReload;
|
||||
|
||||
getDefaultOptions(): IPluginOptions<TConfigSchema> {
|
||||
protected static getStaticDefaultOptions(): IPluginOptions<TConfigSchema> {
|
||||
return {
|
||||
config: {
|
||||
can_roles: false,
|
||||
|
@ -142,6 +143,8 @@ export class UtilityPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
this.savedMessages = GuildSavedMessages.getGuildInstance(this.guildId);
|
||||
this.archives = GuildArchives.getGuildInstance(this.guildId);
|
||||
|
||||
this.lastReload = Date.now();
|
||||
|
||||
if (activeReloads && activeReloads.has(this.guildId)) {
|
||||
activeReloads.get(this.guildId).createMessage(successMessage("Reloaded!"));
|
||||
activeReloads.delete(this.guildId);
|
||||
|
@ -1003,8 +1006,14 @@ export class UtilityPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
|
||||
const shard = this.bot.shards.get(this.bot.guildShardMap[this.guildId]);
|
||||
|
||||
const lastReload = humanizeDuration(Date.now() - this.lastReload, {
|
||||
largest: 2,
|
||||
round: true,
|
||||
});
|
||||
|
||||
const basicInfoRows = [
|
||||
["Uptime", prettyUptime],
|
||||
["Last reload", `${lastReload} ago`],
|
||||
["Last update", moment(lastCommit.committer.date, "X").format("LL [at] H:mm [(UTC)]")],
|
||||
["Version", lastCommit.shortHash],
|
||||
["API latency", `${shard.latency}ms`],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue