When an array of command phrases is provided for a fuzzy command, there is the possibility that the callback will be triggered multiple times. For example, take the following command:
If the user says "leap", the callback will be triggered three times as it matches all three command phrases.
This release introduces a new command option bestMatchOnly. This is false by default but when set will ensure the callback is only called once by the command phrase with the best match. If we modify the example above to
When an array of command phrases is provided for a fuzzy command, there is the possibility that the callback will be triggered multiple times. For example, take the following command:
If the user says "leap", the callback will be triggered three times as it matches all three command phrases.
This release introduces a new command option
bestMatchOnly
. This isfalse
by default but when set will ensure the callback is only called once by the command phrase with the best match. If we modify the example above tothen it will only be called once for the "leave" command, which has a slightly better match than the others.