2023-11-17 19:23:35 +01:00
import { CommandInteraction , SlashCommandBuilder } from 'discord.js' ;
import { Command } from '../types/index' ;
export default {
data : new SlashCommandBuilder ( )
. setName ( 'recipe' )
. setDescription ( '[ADMIN] Manage custom recipes for items' )
. addSubcommand ( sub = >
sub
. setName ( 'create' )
. setDescription ( '[ADMIN] Create a custom recipe' )
)
. setDMPermission ( false )
. setDefaultMemberPermissions ( 0 ) ,
execute : async ( interaction : CommandInteraction ) = > {
if ( ! interaction . isChatInputCommand ( ) ) return ;
interaction . deferReply ( { ephemeral : true } ) ;
const sub = interaction . options . getSubcommand ( true ) ;
if ( sub === 'create' ) {
interaction . reply ( {
ephemeral : true ,
2023-11-17 21:11:50 +01:00
content : ` To create a recipe, go here: ${ interaction . client . config . siteURL } /create-recipe/ \ nOnce done, click the button below and paste the resulting string in. `
2023-11-17 19:23:35 +01:00
} ) ;
}
}
} satisfies Command ;