meshcore.js
Commands

Built-in commands

/help, /plugins and /jobs, and the permissions that unlock them.

Every Client registers three commands. They are ordinary commands built with an internal core flag, so they never collide with yours, and they are listed last in the helper.

/help

A bare / or /help in a DM, a bare @Bot or @Bot help on a channel, list the commands the author can use, filtered by scope and, in a DM, by the author's permissions. A channel listing only shows commands that need no permission. In a DM the answer is one usage line per command, split into up to three parts when it is long; on a channel it is a single line with the command names (helperChannel), trimmed to fit the budget.

/plugins

/plugins lists every plugin with its state and brick count. /plugins load|unload|reload <name> acts on one. It needs Permissions.ManagePlugins and only works in a DM. A LoadError from a reload is summarised on the air with its first issue.

/jobs

/jobs lists every job with its state and next run. /jobs run|pause|resume <name> acts on one. It needs Permissions.ManageJobs and only works in a DM.

Unlocking them

Both commands exist in every bot, but nobody can pass their permission check without a role. A bot without roles exposes nothing extra. An owner role with Permissions.Administrator unlocks both.

roles/owner.ts
export default new RoleBuilder()
  .setName('owner')
  .setDescription('Bot owners')
  .setPriority(1000)
  .addPermissions(Permissions.Administrator)
  .setMembers(['a1b2c3d4e5f6']);

Reference

On this page