Skip to content

DF8401: Cannot Change Command Id

Message

Cannot change the id of a command. Use register() to add new commands.

Cause

The update handle returned by ctx.commands.register(cmd) received a patch with an id key. Command ids are immutable post-registration.

Fix

  • Drop id from the patch object.
  • To register a new command, call ctx.commands.register(newCmd).

Source

Released under the MIT License.