mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: wm8 and average tier calculation
This commit is contained in:
1 parent
c2fca42a86
commit
a12f969251
15 files changed
+315
-328
No files matched your search
+22
-18
@@ -1,8 +1,10 @@
|
||||
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import packageJSON from '../../package.json' assert { type: 'json' };
|
||||
import { ACCENT_COLOR } from '../constants/colors.js';
|
||||
import { tankopedia } from '../core/blitz/tankopedia.js';
|
||||
import { tankAverages } from '../core/blitzstars/tankaverages.js';
|
||||
import cleanTable from '../core/interaction/cleanTable.js';
|
||||
import cmdName from '../core/interaction/cmdName.js';
|
||||
import infoEmbed from '../core/interaction/infoEmbed.js';
|
||||
import getClientId from '../core/process/getClientId.js';
|
||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||
import { client } from '../index.js';
|
||||
@@ -24,22 +26,24 @@ export default {
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setTitle(`${client.user?.username} debug information`)
|
||||
.setColor(ACCENT_COLOR)
|
||||
.setDescription(
|
||||
`**Version**: ${packageJSON.version}\n**Uptime**: ${Math.floor(
|
||||
uptime / 1000 / 60 / 60 / 24,
|
||||
)}d ${Math.floor((uptime / 1000 / 60 / 60) % 24)}h ${Math.floor(
|
||||
(uptime / 1000 / 60) % 60,
|
||||
)}m ${Math.floor((uptime / 1000) % 60)}s ${Math.floor(
|
||||
uptime % 1000,
|
||||
)}ms\n**Tankopedia**: ${
|
||||
tankopedia ? 'cached' : 'not cached'
|
||||
}\n**Client ID**: ${getClientId()}\n**Tag**: ${
|
||||
interaction.client.user.tag
|
||||
}`,
|
||||
),
|
||||
infoEmbed(
|
||||
`${client.user?.username} debug information`,
|
||||
cleanTable([
|
||||
['Version', packageJSON.version],
|
||||
['Client ID', getClientId()],
|
||||
['Tag', interaction.client.user.tag],
|
||||
[
|
||||
'Uptime',
|
||||
`${Math.floor(uptime / 1000 / 60 / 60 / 24)}d ${Math.floor(
|
||||
(uptime / 1000 / 60 / 60) % 24,
|
||||
)}h ${Math.floor((uptime / 1000 / 60) % 60)}m ${Math.floor(
|
||||
(uptime / 1000) % 60,
|
||||
)}s ${Math.floor(uptime % 1000)}ms`,
|
||||
],
|
||||
['Tankopedia cached', `${tankopedia !== undefined}`],
|
||||
['Tank averages cached', `${tankAverages !== undefined}`],
|
||||
]),
|
||||
),
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user