CommandHandler

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class CommandHandler(val value: Array<String>, val rateLimits: RateLimits = RateLimits(0, 0), val scope: Array<UpdateType> = [UpdateType.MESSAGE], val guard: KClass<out Guard> = DefaultGuard::class, val argParser: KClass<out ArgumentParser> = DefaultArgParser::class)

The annotation used to mark the function used to process the specified commands.

Types

Link copied to clipboard
annotation class CallbackQuery(val value: Array<String>, val rateLimits: RateLimits = RateLimits(0, 0), val guard: KClass<out Guard> = DefaultGuard::class, val argParser: KClass<out ArgumentParser> = DefaultArgParser::class)

Shortcut CommandHandler annotation with specified scope for UpdateType.CALLBACK_QUERY.

Properties

Link copied to clipboard

Custom argument parser.

Link copied to clipboard
val guard: KClass<out Guard>

Guard condition that will be checked.

Link copied to clipboard

Query limits for this particular command.

Link copied to clipboard

Scope in which the command will be checked.

Link copied to clipboard

Keywords of the command.