static async validateArgument(argDef, argValue, command) {
    async function onFirstEntry(argDef, traversalStack, argValue, command) {
      const currentElement = traversalStack[traversalStack.length - 1];
      // Check each option only once during the traversal, but before its children.
      if (argDef.validationOptions[currentElement.name] === true) {
        if (currentElement.func !== undefined) {
          await currentElement.func(argDef, argValue, command);
        }
      }
    }

    await this.traverseTreeWithActions(argDef, { onFirstEntry }, argValue, command);
  }
/**
   * Validates a command's argument value according to it's definition and validation options.
   * @throws BotPublicError
   * @param  {CommandArgDef} argDef      the argument definition
   * @param  {Object}        argValue    the argument value
   * @param  {Command}       command     the command having the argument
   */
Validates a command's argument value according to it's definition and validation options.
@throws BotPublicError
@param  {CommandArgDef} argDef      the argument definition
@param  {Object}        argValue    the argument value
@param  {Command}       command     the command having the argument
Validates a command ' s argument value according to it ' s definition and validation options . @throws BotPublicError @param { CommandArgDef } argDef the argument definition @param { Object } argValue the argument value @param { Command } command the command having the argument
static async validateArgument(argDef, argValue, command) {
    async function onFirstEntry(argDef, traversalStack, argValue, command) {
      const currentElement = traversalStack[traversalStack.length - 1];
      if (argDef.validationOptions[currentElement.name] === true) {
        if (currentElement.func !== undefined) {
          await currentElement.func(argDef, argValue, command);
        }
      }
    }
    await this.traverseTreeWithActions(argDef, { onFirstEntry }, argValue, command);
  }
static async validateArgument ( argDef , argValue , command ) { async function onFirstEntry ( argDef , traversalStack , argValue , command ) { const currentElement = traversalStack [ traversalStack . length - 1 ] ; if ( argDef . validationOptions [ currentElement . name ] === true ) { if ( currentElement . func !== undefined ) { await currentElement . func ( argDef , argValue , command ) ; } } } await this . traverseTreeWithActions ( argDef , { onFirstEntry } , argValue , command ) ; }
Validates a command's argument value according to it's definition and validation options.
Validates a command ' s argument value according to it ' s definition and validation options .
// Check each option only once during the traversal, but before its children.