Package-level declarations
Types
Link copied to clipboard
class DefaultCustomBehaviourContextAndTypeReceiver<BC : BehaviourContext, R, U : Update>(wrapperReceiver: CustomBehaviourContextAndTypeReceiver<BC, R, U>) : SuspendFunction2<BC, U, R>
Behaviour wrapper that injects a lazily-evaluated, cached provider of bot information into the BehaviourContext.
Link copied to clipboard
Functions
Link copied to clipboard
Returns bot information (result of GetMe) associated with this BehaviourContext, if available.
Link copied to clipboard
Link copied to clipboard
suspend fun BehaviourContext.containsCommand(command: String, textSources: TextSourcesList): Boolean
suspend fun BehaviourContext.containsCommand(commandRegex: Regex, textSources: TextSourcesList): Boolean
Link copied to clipboard
suspend fun BehaviourContext.followLocation(message: ContentMessage<LiveLocationContent>, onLocation: BehaviourContextAndTypeReceiver<Unit, Location>)
Use this extension when you want to follow LiveLocation until it will became StaticLocation. This method is synchronous. You may use something like kotlinx.coroutines.launch or kotlinx.coroutines.async to run it asynchronously
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <BC : BehaviourContext, R, U : Update> CustomBehaviourContextAndTypeReceiver<BC, R, U>.optionallyWithDefaultReceiver(include: Boolean, data: BehaviourContextData): suspend BC.(U) -> R
Link copied to clipboard
operator fun <T> BehaviourContextAndTwoTypesReceiver<Boolean, T, Update>.plus(other: BehaviourContextAndTwoTypesReceiver<Boolean, T, Update>): suspend BehaviourContext.(T, Update) -> Boolean
Link copied to clipboard
operator fun <T> BehaviourContextAndTwoTypesReceiver<Boolean, T, Update>.times(other: BehaviourContextAndTwoTypesReceiver<Boolean, T, Update>): suspend BehaviourContext.(T, Update) -> Boolean
Link copied to clipboard
Works as not
Link copied to clipboard
fun <BC : BehaviourContext, R, U : Update> CustomBehaviourContextAndTypeReceiver<BC, R, U>.withDefaultReceiver(data: BehaviourContextData): DefaultCustomBehaviourContextAndTypeReceiver<BC, R, U>