Files
blitzkit/src/commands/help.ts
T

43 lines
1.6 KiB
TypeScript
Raw Normal View History

2023-04-26 14:23:42 +00:00
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
import discord from '../../discord.json' assert { type: 'json' };
2023-05-28 16:56:15 +00:00
import { ACCENT_COLOR } from '../constants/colors.js';
2023-05-13 22:01:58 +00:00
import cmdName from '../core/interaction/cmdName.js';
2023-05-21 16:50:05 +00:00
import {
CommandRegistry,
guildCommands,
publicCommands,
} from '../events/interactionCreate.js';
2023-04-28 13:52:31 +00:00
import { client } from '../index.js';
2023-04-26 14:23:42 +00:00
export default {
2023-04-26 23:43:43 +00:00
inProduction: true,
2023-06-06 16:53:13 +00:00
inDevelopment: false,
2023-04-26 14:23:42 +00:00
inPublic: true,
command: new SlashCommandBuilder()
2023-05-13 01:27:12 +00:00
.setName(cmdName('help'))
2023-04-26 14:23:42 +00:00
.setDescription('All the help you need about the bot'),
2023-04-28 13:42:42 +00:00
async execute(interaction) {
2023-05-08 01:45:57 +00:00
await interaction.editReply({
2023-04-26 14:23:42 +00:00
embeds: [
new EmbedBuilder()
2023-04-28 13:52:31 +00:00
.setTitle(`${client.user?.username} help`)
2023-05-28 16:56:15 +00:00
.setColor(ACCENT_COLOR)
2023-04-26 14:23:42 +00:00
.setDescription(
2023-04-28 13:52:31 +00:00
`**About**\n${
client.user?.username
2023-05-21 16:50:05 +00:00
} automates many mundane tasks and provide statistics in numerous flexible ways.\n\nMade by TresAbhi from the Skilled [SKLLD] clan.\nGitHub: https://github.com/tresabhi/blitzkrieg\nDiscord server: https://discord.gg/nDt7AjGJQH\nSkilled server: https://discord.gg/ZPvcEG7DS8\n\n**Commands**\n${(interaction.guildId ===
2023-05-19 23:36:02 +00:00
discord.sklld_guild_id
2023-04-28 13:42:42 +00:00
? [...guildCommands, ...publicCommands]
: publicCommands
2023-04-26 14:23:42 +00:00
)
.map((command) => `**/${command.name}**: ${command.description}`)
.join(
'\n',
2023-04-26 23:42:15 +00:00
)}\n\n*I am a new bot; I may make mistakes and go offline unexpectedly from time to time.*`,
2023-04-26 14:23:42 +00:00
),
],
});
},
} satisfies CommandRegistry;