OneArgCommand
public struct OneArgCommand<A> : ExecutableCommand where A : CommandArgumentConvertible
Base command with one argument
-
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) -> 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) -> OneArgCommand<A> -
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<B>(_ t: B.Type, named name: String) -> TwoArgCommand<A, B> where B : CommandArgumentConvertibleParameters
tType of the argument.
nameName of the argument.
View on GitHub
OneArgCommand Structure Reference