2023-04-26 14:23:42 +00:00
import { EmbedBuilder , SlashCommandBuilder } from 'discord.js' ;
import discord from '../../discord.json' assert { type : 'json' };
2023-04-28 13:42:42 +00:00
import {
CommandRegistry ,
guildCommands ,
publicCommands ,
} from '../behaviors/interactionCreate.js' ;
2023-04-26 14:23:42 +00:00
import { SKILLED_COLOR } from '../constants/colors.js' ;
2023-04-28 13:52:31 +00:00
import { client } from '../index.js' ;
2023-05-13 01:27:12 +00:00
import cmdName from '../utilities/cmdName.js' ;
2023-04-26 14:23:42 +00:00
export default {
2023-04-26 23:43:43 +00:00
inProduction : true ,
2023-05-13 01:27:12 +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-04-26 14:23:42 +00:00
. setColor ( SKILLED_COLOR )
. setDescription (
2023-04-28 13:52:31 +00:00
`**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/sklld/bot \ nSkilled: https://discord.gg/ZPvcEG7DS8 \ n \ n**Commands** \ n ${ ( interaction . guildId ===
2023-04-26 14:23:42 +00:00
discord . 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
),
],
});
console . log ( 'Displaying help information' );
},
} satisfies CommandRegistry ;