v0.13.8
errors and warnings / stdlib

errors and warnings / stdlib / E8010

E8010 error

Duplicate slash command

area
stdlib (x8xxx)
fails the build
yes

The same slash command is registered twice in the addon, with @slash or the slash module. Commands are compared without case, so /mytool and /MyTool are the same command; the game would run only one of the handlers.

Register each command once. To give one handler several commands, list them all in one @slash(...).

Example

× failswowlua
import slash from "wowlua:slash" @slash("/mytool")local function open(msg: string) print(msg) end @slash("/MyTool")local function toggle(msg: string) print(msg) end
✓ compileswowlua
import slash from "wowlua:slash" @slash("/mytool", "/mt")local function open(msg: string) print(msg) end

The compiler reports it like this:

error[E8010]: the slash command `/MyTool` is registered twice
  ┌─ src/main.wowlua:6:8
  │
6 │ @slash("/MyTool")
  │        ^^^^^^^^^ again
codemessage
E8101Invalid slash command name (must start with /, no whitespace)
W8011Slash command collides with a Blizzard command

Offline

terminal
$ wowlua explain E8010
E8010 (error): Duplicate slash command

source on GitHub ↗