TwoArgCommand
public struct TwoArgCommand<A, B> : ExecutableCommand where A : CommandArgumentConvertible, B : CommandArgumentConvertible
Base command with two 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, A.ResolvedArgument, B.ResolvedArgument) -> AnyFuture
-
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) -> TwoArgCommand<A, B>
-
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<C>(_ t: C.Type, named name: String) -> ThreeArgCommand<A, B, C> where C : CommandArgumentConvertible
Parameters
t
Type of the argument.
name
Name of the argument.