@reciple/core
contains the core components of Reciple such as the extended Discord.js Client and command builders.
// @ts-check
import { RecipleClient, SlashCommandBuilder } from '@reciple/core';
const client = new RecipleClient({
token: 'YOUR_TOKEN',
client: {
intents: ['Guilds']
}
});
await client.login();
client.commands?.add(
new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with pong!')
.setExecute(async ({ interaction }) => {
await interaction.reply('Pong!');
}),
)
await client.commands?.registerApplicationCommands();
client.on('interactionCreate', async interaction => {
if (interaction.isChatInputCommand()) await client.commands?.execute(interaction);
});