$updateCommands
$updateCommands
will reload your commands of your command folder / will make changes effective.
Usage
$updateCommands
- Will only work if you use a command handler, example below:
1const { AoiClient } = require("aoi.js");2
3const client = new AoiClient({4 token: "DISCORD BOT TOKEN",5 prefix: "DISCORD BOT PREFIX",6 intents: ["GuildMessages", "MessageContent", "Guilds"],7 events: ["onMessage", "onInteractionCreate"],8 database: {9 type: "aoi.db",10 db: require("@aoijs/aoi.db"),11 tables: ["main"],12 path: "./database/",13 extraOptions: {14 dbType: "KeyValue"15 }16 }17});18
19client.loadCommands("./commands/", true); // your command directory.
Example(s)
This will update the commands of your bot without restarting it:
1client.command({2 name: "updateCommands",3 code: `4 $updateCommands5 `6});