150
edits
Heatherpedia (talk | contribs) (→A note on (backwards) compatibility: added section) |
Heatherpedia (talk | contribs) (→Supporting both Parser 1 and Parser 2 in Your Command Feed: added content) |
||
Line 22: | Line 22: | ||
=== Supporting both Parser 1 and Parser 2 in Your Command Feed === | === Supporting both Parser 1 and Parser 2 in Your Command Feed === | ||
There is a property added to the Command API that allows you to present different commands to clients running Parser 1 and Parser 2, called CmdUtils.parserVersion. A command can provide different options to CmdUtils.CreateCommand() and behave differently depending on this value, allowing a single command feed to cater to whatever parser the user is using. | |||
if (CmdUtils.parserVersion == 1) | |||
//parser 1 command here | |||
else | |||
//parser 2 command here | |||
== Converting your command == | == Converting your command == |
edits