Skip to main content

Sync slash commands

You need to use the sync method of the Fold class.

Usage

<client>.fold.sync()

Example

const { Erine } = require('erine');

const bot = new Erine(...);

bot.on('ready', function(bot) {
bot.fold.sync().then(() => console.log('Slash commands synced!'));
});

bot.connect();

You can use the autoSync in constructor options instead.

const { Erine } = require('erine'); // for TypeScript use: import { Erine } from 'erine'; 

const bot = new Erine({
auth: "Bot BOT TOKEN HERE",
gateway: {
intents: [...intents]
},
owners: string[]
prefix: string | prefix(ctx) => string,
autoSync: boolean
});