ArrayArgCommand
public struct ArrayArgCommand : ExecutableCommand
Base command with four or more arguments
-
Declaration
Swift
public let name: String
-
Declaration
Swift
public let group: String?
-
Declaration
Swift
public let alias: [String]
-
Declaration
Swift
public let hookWhitelist: [HookID]
-
Declaration
Swift
public let permissionChecks: [CommandPermissionChecker]
-
Declaration
Swift
public let closure: (CommandEvent, Arguments) throws -> AnyFuture
-
Arguments for this command.
Declaration
Swift
public let arguments: [CommandArgument]
-
Declaration
Swift
public var readableArguments: String? { get }
-
Declaration
Swift
public func copyWith(name: String, group: String?, alias: [String], hookWhitelist: [HookID], permissionChecks: [CommandPermissionChecker], closure: @escaping Execute) -> ArrayArgCommand
-
Declaration
Swift
public func validate() throws
-
Declaration
Swift
public func invoke(on event: CommandEvent) -> EventLoopFuture<Void>
-
Add an argument to this command
Command("echo") .arg(String.Consuming.self, named: "content")
Declaration
Swift
public func arg<T>(_ t: T.Type, named name: String) -> ArrayArgCommand where T : CommandArgumentConvertible
Parameters
t
Type of the argument.
name
Name of the argument.