execute
Whether managing slash commands, context menus, or other interactive components, "execute" empowers you to define and execute custom logic effortlessly, enhancing user engagement and bot functionality.
Usage
import { Slash, execute } from 'sunar';
const slash = new Slash({
name: 'ping',
description: "Ping the bot to check if it's online.",
});
execute(slash, (interaction) => {
interaction.reply('Pong!');
});
export { slash };How is this guide?
Last updated on
config
Configure builders and fine-tune your discord bot's functionality with the flexible "config" mutator in Sunar. Customize settings, adjust parameters, and optimize your bot's behavior seamlessly.
protect
Discover the "protect" mutator in Sunar, designed to enforce permissions and safeguard interactions within your Discord bot. By integrating "protect" into your commands and interactions, you can ensure that only authorized users or roles can access specific functionalities, enhancing security and control over bot operations.