From 3e0a7a7e6463adcb4e1aa80068d3bf46ada2d9a5 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 14 Jun 2023 13:58:34 +0600 Subject: [PATCH] Update behaviour-builder.md --- docs/tgbotapi/logic/behaviour-builder.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/tgbotapi/logic/behaviour-builder.md b/docs/tgbotapi/logic/behaviour-builder.md index 2cc2c3c..ce06558 100644 --- a/docs/tgbotapi/logic/behaviour-builder.md +++ b/docs/tgbotapi/logic/behaviour-builder.md @@ -1,14 +1,14 @@ -# Behaviour Builder - +# Behaviour Builder + In the previous pages about [updates handling](https://bookstack.inmo.dev/books/telegrambotapi/page/updates-with-flows) and was mentioned that currently in the most cases you should use [Flow](https://kotlinlang.org/docs/flow.html)s. So, there is an improvement for that system which hide direct work with flows and allow you to create more declarative logic of your bot. ## Main parts of Behaviour Builder There are several things you should know for better understanding of behaviour builder: -* [BehaviourContext](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt#L33) - it is the thing which contains all necessary tools for working with bots -* [Triggers](https://tgbotapi.inmo.dev/docs/dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling/index.html) - `on*` extensions for `BehaviourContext` which allow you to create reaction on some update -* [Expectations](https://tgbotapi.inmo.dev/docs/dev.inmo.tgbotapi.extensions.behaviour_builder.expectations/index.html) (or waiters) - `wait*` extensions which you **may** use in [buildBehaviour](https://tgbotapi.inmo.dev/docs/dev.inmo.tgbotapi.extensions.behaviour_builder/build-behaviour.html) function, but ***it is recommended*** to use it in bodies of triggers +* [BehaviourContext](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext.kt#L34) - it is the thing which contains all necessary tools for working with bots +* [Triggers](https://tgbotapi.inmo.dev/tgbotapi.behaviour_builder/dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling/index.html) - `on*` extensions for `BehaviourContext` which allow you to create reaction on some update +* [Expectations](https://tgbotapi.inmo.dev/tgbotapi.behaviour_builder/dev.inmo.tgbotapi.extensions.behaviour_builder.expectations/index.html) (or waiters) - `wait*` extensions which you **may** use in [buildBehaviour](https://tgbotapi.inmo.dev/docs/dev.inmo.tgbotapi.extensions.behaviour_builder/build-behaviour.html) function, but ***it is recommended*** to use it in bodies of triggers ## Initialization @@ -65,4 +65,4 @@ bot.buildBehaviour { // ... } } -``` \ No newline at end of file +```