Test servers

You may want some commands to only be enabled in specific servers/guilds for testing. This will give you a good idea if something is working in a production environment without risking bugs for your other users.

You can easily specify a command as a "test only" command like so:

ping.js
const { CommandType } = require("wokcommands");

module.exports = {
  description: "Ping pong command",

  type: CommandType.BOTH,

  testOnly: true,

  callback: () => {
    return {
      content: "Pong!",
    };
  },
};

You can then specify any amount of server/guild IDs when initializing WOKCommands like so:

Last updated

Was this helpful?