ArgumentContext

Properties

# Command

ArgumentContext.Command: CommandContext

The command that this argument belongs to.

# Name

ArgumentContext.Name: string

The name of this argument.

# Type

ArgumentContext.Type: TypeDefinition

The type definition for this argument.

# Required

ArgumentContext.Required: boolean

Whether or not this argument was required.

# Executor

ArgumentContext.Executor: Player

The player that ran the command this argument belongs to.

# RawValue

ArgumentContext.RawValue: string

The raw, unparsed value for this argument.

# RawSegments

ArgumentContext.RawSegments: array<string>

An array of strings representing the values in a comma-separated list, if applicable.

# Prefix

ArgumentContext.Prefix: string

The prefix used in this argument (like % in %Team). Empty string if no prefix was used. See Prefixed Union Types for more details.

Instance Methods

# GetValue

ArgumentContext.GetValue() → any

Returns the parsed value for this argument.

Returns

Type
any

# GetTransformedValue

ArgumentContext.GetTransformedValue(segment: number) → any...

Returns the transformed value from this argument, see Types.

Parameters

Name Type Required
segment number

Returns

Type
any...
Last Updated: 9/8/2019, 2:11:38 AM