static generateValidationError(argDef, command, logText, publicTextId, additionalArguments) {
    const commandName = command.constructor.getCommandInterfaceName();
    const mainAlias = command.langManager.getString(argDef.aliasIds[0]);
    let publicTextsArray = [mainAlias];
    if (additionalArguments !== undefined) {
      publicTextsArray = publicTextsArray.concat(additionalArguments);
    }

    command.context.log.e(commandName + ' validateArgs: ' + logText + ' ' + mainAlias);
    throw new BotPublicError(command.langManager.getString(publicTextId, publicTextsArray));
  }
/**
   * Creates and throws a public error as a result of validation violation for an argument.
   * @throws BotPublicError
   * @param  {CommandArgDef} argDef              the argument definition
   * @param  {Command}       command             the command having the argument
   * @param  {string}        logText             the string to be logged internally
   * @param  {string}        publicTextId        the id of the text to be displayed to the users
   * @param  {Array<string>} additionalArguments the additional arguments for the public string (besides the alias)
   */
Creates and throws a public error as a result of validation violation for an argument.
Creates and throws a public error as a result of validation violation for an argument .
static generateValidationError(argDef, command, logText, publicTextId, additionalArguments) {
    const commandName = command.constructor.getCommandInterfaceName();
    const mainAlias = command.langManager.getString(argDef.aliasIds[0]);
    let publicTextsArray = [mainAlias];
    if (additionalArguments !== undefined) {
      publicTextsArray = publicTextsArray.concat(additionalArguments);
    }
    command.context.log.e(commandName + ' validateArgs: ' + logText + ' ' + mainAlias);
    throw new BotPublicError(command.langManager.getString(publicTextId, publicTextsArray));
  }
static generateValidationError ( argDef , command , logText , publicTextId , additionalArguments ) { const commandName = command . constructor . getCommandInterfaceName ( ) ; const mainAlias = command . langManager . getString ( argDef . aliasIds [ 0 ] ) ; let publicTextsArray = [ mainAlias ] ; if ( additionalArguments !== undefined ) { publicTextsArray = publicTextsArray . concat ( additionalArguments ) ; } command . context . log . e ( commandName + ' validateArgs: ' + logText + ' ' + mainAlias ) ; throw new BotPublicError ( command . langManager . getString ( publicTextId , publicTextsArray ) ) ; }
Creates and throws a public error as a result of validation violation for an argument.
Creates and throws a public error as a result of validation violation for an argument .