mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: return-based interaction reply edits
This commit is contained in:
1 parent
fbcd9e82e3
commit
4d9dc067af
19 files changed
+249
-306
No files matched your search
+20
-24
@@ -13,38 +13,34 @@ const executionStart = new Date().getTime();
|
||||
|
||||
export default {
|
||||
inProduction: true,
|
||||
inDevelopment: false,
|
||||
inDevelopment: true,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
.setName(cmdName('debug'))
|
||||
.setDescription('Debug information about the bot'),
|
||||
|
||||
async execute(interaction) {
|
||||
execute(interaction) {
|
||||
const currentTime = new Date().getTime();
|
||||
const uptime = currentTime - executionStart;
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
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}`],
|
||||
]),
|
||||
),
|
||||
],
|
||||
});
|
||||
return 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}`],
|
||||
]),
|
||||
);
|
||||
},
|
||||
} satisfies CommandRegistry;
|
||||
Reference in new issue
Block a user