2023-06-16 02:01:06 +00:00
import { SlashCommandBuilder } from 'discord.js' ;
2023-04-26 14:23:42 +00:00
import discord from '../../discord.json' assert { type : 'json' };
2023-06-26 15:05:05 +00:00
import { client } from '../bot.js' ;
2023-06-27 02:22:28 +00:00
import embedInfo from '../core/discord/embedInfo.js' ;
2023-05-21 16:50:05 +00:00
import {
CommandRegistry ,
guildCommands ,
publicCommands ,
2023-06-25 02:32:56 +00:00
} from '../events/interactionCreate/index.js' ;
2023-04-26 14:23:42 +00:00
2023-07-05 01:15:18 +00:00
export const helpCommand : CommandRegistry = {
2023-04-26 23:43:43 +00:00
inProduction : true ,
2023-07-08 19:39:35 +00:00
inDevelopment : false ,
2023-04-26 14:23:42 +00:00
inPublic : true ,
command : new SlashCommandBuilder ()
2023-06-21 02:01:12 +00:00
. setName ( 'help' )
2023-04-26 14:23:42 +00:00
. setDescription ( 'All the help you need about the bot' ),
2023-06-27 01:43:30 +00:00
handler ( interaction ) {
2023-06-27 02:22:28 +00:00
return embedInfo (
2023-06-16 02:01:06 +00:00
` ${ client . user ? . username } help` ,
`**About** \ n ${
client . user ? . username
} 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 ===
discord . sklld_guild_id
? [... guildCommands , ... publicCommands ]
: publicCommands
)
. map (( command ) => `**/ ${ command . name } **: ${ command . description } ` )
. join (
'\n' ,
) } \ 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
},
2023-07-05 01:15:18 +00:00
};