Sunar

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.

Usage

src/commands/ping.js
import { Slash, execute, config } from 'sunar';

const slash = new Slash({
	name: 'ping',
	description: "Ping the bot to check if it's online.",
});

config(slash, {
    cooldown: 5000,
    guildsIds: [/* ... */],
});
 
execute(slash, (interaction) => {
	interaction.reply('Pong!');
});

export { slash };

Implementation

Reference

config

Prop

Type

CooldownConfig

Prop

Type

How is this guide?

Last updated on