Wowpedia
Advertisement

Returns all console variables and commands.

commands = C_Console.GetAllCommands()

Returns

commands 
ConsoleCommandInfo[]
Key Type Description
command string
help string
category Enum.ConsoleCategory
commandType Enum.ConsoleCommandType
scriptContents string
scriptParameters string
Enum.ConsoleCategory
Value Key Description
0 Debug
1 Graphics
2 Console
3 Combat
4 Game
5 Default
6 Net
7 Sound
8 Gm
9 Reveal
10 None
Enum.ConsoleCommandType
Value Key Description
0 Cvar
1 Command
2 Macro
3 Script

Details

  • Not all cvars are returned yet on initial login[1] until VARIABLES_LOADED, e.g. AutoPushSpellToActionBar

Example

Prints all cvars and commands.

/run for k, v in pairs(C_Console.GetAllCommands()) do print(k, v.command) end

Patch changes

  • Shadowlands Patch 9.1.0 (2021-06-29): Added scriptParameters and Macro fields.
  • Battle for Azeroth Patch 8.2.5 (2019-09-24): Removed "Category" prefix, e.g. CategoryDebug to Debug
  • Legion Patch 7.3.0 (2017-08-29): Added.

References

Advertisement