@reciple/core
v8.4.0
Published
Reciple core implementations
Downloads
109
Maintainers
Readme
About
@reciple/core
contains the core components of Reciple such as the extended Discord.js Client and command builders.
Usage
import { RecipleClient, SlashCommandBuilder } from '@reciple/core';
const client = new RecipleClient({
token: 'MTExIHlvdSEgpHJpZWQgMTEx.O5rKAA.dQw4w9WgXxQ_wpV-gGg4PSk_bm8',
client: {
intents: [
'Guilds',
'GuildMessages',
'MessageContent'
]
}
});
await client.login();
client.commands.add(
new SlashCommandBuilder()
.setName('ping')
.setDescription('Ping bot')
.setExecute(async ({ interaction }) => interaction.reply(`Pong!`))
);
await client.commands.registerApplicationCommands();
client.on('interactionCreate', async interaction => {
if (interaction.isChatInputCommand()) await client.commands.execute(interaction);
});