onCommand

fun onCommand(command: String, scope: Set<UpdateType> = DEFAULT_SCOPE, rateLimits: RateLimits = RateLimits.NOT_LIMITED, guard: Guard = DefaultGuard, argParser: KClass<out ArgumentParser> = DefaultArgParser::class, block: OnCommandActivity)

The action that is performed when the command is matched.

Parameters

command

The command that will be processed.

scope

update type that should match for command.

rateLimits

Restriction of command requests.

block

Action that will be applied.