This commit is contained in:
InsanusMokrassar committed 2024-05-29 10:32:24 +00:00
1 parent dc46ca1d49
commit 89c68ad618
4 files changed
+160 -47

No files matched your search

+1 -1
View File
@@ -1 +1 @@
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Insanus Mokrassar libraries home","text":"<p>Hello :) It is my libraries docs place and I glad to welcome you here. I hope, this documentation place will help you.</p>"},{"location":"index.html#projects","title":"Projects","text":"Common and independent TelegramBotAPI Plagubot"},{"location":"index.html#dependencies-graph","title":"Dependencies graph:","text":"%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%% flowchart TB KSLog[KSLog] MicroUtils[MicroUtils] TelegramBotAPI[TelegramBotAPI] TelegramBotAPI-examples[TelegramBotAPI-examples ] PlaguBot[PlaguBot] TelegramBotAPILibraries[TelegramBotAPILibraries] PlaguBotPlugins[PlaguBotPlugins] PlaguBotExample[PlaguBotExample] BooruGrabberTelegramBot[BooruGrabberTelegramBot] SauceNaoTelegramBot[SauceNaoTelegramBot] PlaguPoster[PlaguPoster] PlaguBotSuggestionsBot[PlaguBotSuggestionsBot] TelegramBotTutorial[TelegramBotTutorial] Krontab[Krontab] KJSUiKit[KJSUiKit] SauceNaoAPI[SauceNaoAPI] Navigation[Navigation] TelegramBotAPI-bot_template[TelegramBotAPI-bot_template] PlaguBotPluginTemplate[PlaguBotPluginTemplate] PlaguBotBotTemplate[PlaguBotBotTemplate] MicroUtils --&gt; KSLog TelegramBotAPI --&gt; MicroUtils TelegramBotAPI-examples --&gt; TelegramBotAPI PlaguBot --&gt; TelegramBotAPI TelegramBotAPILibraries --&gt; PlaguBot PlaguBotPlugins --&gt; TelegramBotAPILibraries PlaguBotExample --&gt; PlaguBotPlugins BooruGrabberTelegramBot --&gt; TelegramBotAPI BooruGrabberTelegramBot --&gt; Krontab SauceNaoTelegramBot --&gt; TelegramBotAPI SauceNaoTelegramBot --&gt; SauceNaoAPI TelegramBotTutorial --&gt; PlaguBotPlugins PlaguBotSuggestionsBot --&gt; PlaguBotPlugins PlaguPoster --&gt; PlaguBotPlugins PlaguPoster --&gt; Krontab SauceNaoAPI --&gt; MicroUtils Navigation --&gt; MicroUtils TelegramBotAPI-bot_template -.- TelegramBotAPI PlaguBotPluginTemplate -.- PlaguBot PlaguBotBotTemplate -.- PlaguBot"},{"location":"krontab/index.html","title":"krontab","text":"<p>Library was created to give opportunity to launch some things from time to time according to some schedule in runtime of applications.</p>"},{"location":"krontab/index.html#how-to-use","title":"How to use","text":"<p>Here you may find the builder for <code>Krontab</code> templates creation.</p> <p>There are several ways to configure and use this library:</p> <ul> <li>From some string</li> <li>From builder</li> </ul> <p>Anyway, to start some action from time to time you will need to use one of extensions/functions:</p> <pre><code>val kronScheduler = /* creating of KronScheduler instance */;\n\nkronScheduler.doWhile {\n // some action\n true // true - repeat on next time\n}\n</code></pre>"},{"location":"krontab/index.html#including-in-project","title":"Including in project","text":"<p>If you want to include <code>krontab</code> in your project, just add next line to your dependencies part:</p> <pre><code>implementation \"dev.inmo:krontab:$krontab_version\"\n</code></pre> <p>Next version is the latest currently for the library:</p> <p></p> <p>For old version of Gradle, instead of <code>implementation</code> word developers must use <code>compile</code>.</p>"},{"location":"krontab/index.html#config-from-string","title":"Config from string","text":"<p>Developers can use more simple way to configure repeat times is string. String configuring like a <code>crontab</code>, but with a little bit different meanings:</p> <pre><code>/--------------- Seconds\n| /------------- Minutes\n| | /----------- Hours\n| | | /--------- Days of months\n| | | | /------- Months\n| | | | | /----- (optional) Year\n| | | | | | /--- (optional) Timezone offset\n| | | | | | | / (optional) Week days\n* * * * * * 0o *w\n</code></pre> <p>It is different with original <code>crontab</code> syntax for the reason, that expected that in practice developers will use seconds and minutes with more probability than months (for example) or even years. In fact, developers will use something like:</p> <pre><code>doWhile(\"/5 * * * *\") {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Another version:</p> <pre><code>doInfinity(\"/5 * * * *\") {\n println(\"Called\")\n}\n</code></pre> <p>Both of examples will print <code>Called</code> message every five seconds.</p>"},{"location":"krontab/index.html#config-via-builder","title":"Config via builder","text":"<p>Also, this library currently supports DSL for creating the same goals:</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n from (0) every 5\n }\n}\nkronScheduler.doWhile {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n 0 every 5\n }\nLine truncated {"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Insanus Mokrassar libraries home","text":"<p>Hello :) It is my libraries docs place and I glad to welcome you here. I hope, this documentation place will help you.</p>"},{"location":"index.html#projects","title":"Projects","text":"Common and independent TelegramBotAPI Plagubot"},{"location":"index.html#dependencies-graph","title":"Dependencies graph:","text":"%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%% flowchart TB KSLog[KSLog] MicroUtils[MicroUtils] TelegramBotAPI[TelegramBotAPI] TelegramBotAPI-examples[TelegramBotAPI-examples ] PlaguBot[PlaguBot] TelegramBotAPILibraries[TelegramBotAPILibraries] PlaguBotPlugins[PlaguBotPlugins] PlaguBotExample[PlaguBotExample] BooruGrabberTelegramBot[BooruGrabberTelegramBot] SauceNaoTelegramBot[SauceNaoTelegramBot] PlaguPoster[PlaguPoster] PlaguBotSuggestionsBot[PlaguBotSuggestionsBot] TelegramBotTutorial[TelegramBotTutorial] Krontab[Krontab] KJSUiKit[KJSUiKit] SauceNaoAPI[SauceNaoAPI] Navigation[Navigation] TelegramBotAPI-bot_template[TelegramBotAPI-bot_template] PlaguBotPluginTemplate[PlaguBotPluginTemplate] PlaguBotBotTemplate[PlaguBotBotTemplate] MicroUtils --&gt; KSLog TelegramBotAPI --&gt; MicroUtils TelegramBotAPI-examples --&gt; TelegramBotAPI PlaguBot --&gt; TelegramBotAPI TelegramBotAPILibraries --&gt; PlaguBot PlaguBotPlugins --&gt; TelegramBotAPILibraries PlaguBotExample --&gt; PlaguBotPlugins BooruGrabberTelegramBot --&gt; TelegramBotAPI BooruGrabberTelegramBot --&gt; Krontab SauceNaoTelegramBot --&gt; TelegramBotAPI SauceNaoTelegramBot --&gt; SauceNaoAPI TelegramBotTutorial --&gt; PlaguBotPlugins PlaguBotSuggestionsBot --&gt; PlaguBotPlugins PlaguPoster --&gt; PlaguBotPlugins PlaguPoster --&gt; Krontab SauceNaoAPI --&gt; MicroUtils Navigation --&gt; MicroUtils TelegramBotAPI-bot_template -.- TelegramBotAPI PlaguBotPluginTemplate -.- PlaguBot PlaguBotBotTemplate -.- PlaguBot"},{"location":"krontab/index.html","title":"krontab","text":"<p>Library was created to give opportunity to launch some things from time to time according to some schedule in runtime of applications.</p>"},{"location":"krontab/index.html#how-to-use","title":"How to use","text":"<p>Here you may find the builder for <code>Krontab</code> templates creation.</p> <p>There are several ways to configure and use this library:</p> <ul> <li>From some string</li> <li>From builder</li> </ul> <p>Anyway, to start some action from time to time you will need to use one of extensions/functions:</p> <pre><code>val kronScheduler = /* creating of KronScheduler instance */;\n\nkronScheduler.doWhile {\n // some action\n true // true - repeat on next time\n}\n</code></pre>"},{"location":"krontab/index.html#including-in-project","title":"Including in project","text":"<p>If you want to include <code>krontab</code> in your project, just add next line to your dependencies part:</p> <pre><code>implementation \"dev.inmo:krontab:$krontab_version\"\n</code></pre> <p>Next version is the latest currently for the library:</p> <p></p> <p>For old version of Gradle, instead of <code>implementation</code> word developers must use <code>compile</code>.</p>"},{"location":"krontab/index.html#config-from-string","title":"Config from string","text":"<p>Developers can use more simple way to configure repeat times is string. String configuring like a <code>crontab</code>, but with a little bit different meanings:</p> <pre><code>/--------------- Seconds\n| /------------- Minutes\n| | /----------- Hours\n| | | /--------- Days of months\n| | | | /------- Months\n| | | | | /----- (optional) Year\n| | | | | | /--- (optional) Timezone offset\n| | | | | | | / (optional) Week days\n* * * * * * 0o *w\n</code></pre> <p>It is different with original <code>crontab</code> syntax for the reason, that expected that in practice developers will use seconds and minutes with more probability than months (for example) or even years. In fact, developers will use something like:</p> <pre><code>doWhile(\"/5 * * * *\") {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Another version:</p> <pre><code>doInfinity(\"/5 * * * *\") {\n println(\"Called\")\n}\n</code></pre> <p>Both of examples will print <code>Called</code> message every five seconds.</p>"},{"location":"krontab/index.html#config-via-builder","title":"Config via builder","text":"<p>Also, this library currently supports DSL for creating the same goals:</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n from (0) every 5\n }\n}\nkronScheduler.doWhile {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n 0 every 5\n }\nLine truncated
+46 -46
View File
@@ -2,232 +2,232 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url> <url>
<loc>https://docs.inmo.dev/index.html</loc> <loc>https://docs.inmo.dev/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/krontab/index.html</loc> <loc>https://docs.inmo.dev/krontab/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/krontab/describing/krontabscheduler.html</loc> <loc>https://docs.inmo.dev/krontab/describing/krontabscheduler.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/krontab/describing/string-format.html</loc> <loc>https://docs.inmo.dev/krontab/describing/string-format.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/krontab/introduction/faq.html</loc> <loc>https://docs.inmo.dev/krontab/introduction/faq.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/krontab/introduction/how-to-use.html</loc> <loc>https://docs.inmo.dev/krontab/introduction/how-to-use.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/krontab/introduction/including-in-project.html</loc> <loc>https://docs.inmo.dev/krontab/introduction/including-in-project.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/kslog/index.html</loc> <loc>https://docs.inmo.dev/kslog/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/kslog/logging.html</loc> <loc>https://docs.inmo.dev/kslog/logging.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/kslog/setup.html</loc> <loc>https://docs.inmo.dev/kslog/setup.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/micro_utils/index.html</loc> <loc>https://docs.inmo.dev/micro_utils/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/micro_utils/colors.ktstemplate.html</loc> <loc>https://docs.inmo.dev/micro_utils/colors.ktstemplate.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/micro_utils/colors.html</loc> <loc>https://docs.inmo.dev/micro_utils/colors.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/micro_utils/resources.html</loc> <loc>https://docs.inmo.dev/micro_utils/resources.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/micro_utils/startup.html</loc> <loc>https://docs.inmo.dev/micro_utils/startup.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/micro_utils/repos/index.html</loc> <loc>https://docs.inmo.dev/micro_utils/repos/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/micro_utils/repos/inmemory.html</loc> <loc>https://docs.inmo.dev/micro_utils/repos/inmemory.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/navigation/index.html</loc> <loc>https://docs.inmo.dev/navigation/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/navigation/getting-started.html</loc> <loc>https://docs.inmo.dev/navigation/getting-started.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/plagubot/index.html</loc> <loc>https://docs.inmo.dev/plagubot/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/plagubot/opportunities_out_of_the_box.html</loc> <loc>https://docs.inmo.dev/plagubot/opportunities_out_of_the_box.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/services/index.html</loc> <loc>https://docs.inmo.dev/services/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/index.html</loc> <loc>https://docs.inmo.dev/tgbotapi/index.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/faq.html</loc> <loc>https://docs.inmo.dev/tgbotapi/faq.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logs.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logs.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/keyboards.html</loc> <loc>https://docs.inmo.dev/tgbotapi/dsls/keyboards.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/live-location.html</loc> <loc>https://docs.inmo.dev/tgbotapi/dsls/live-location.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/text.html</loc> <loc>https://docs.inmo.dev/tgbotapi/dsls/text.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/guides/keyboards.html</loc> <loc>https://docs.inmo.dev/tgbotapi/guides/keyboards.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/before-any-bot-project.html</loc> <loc>https://docs.inmo.dev/tgbotapi/introduction/before-any-bot-project.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/first-bot.html</loc> <loc>https://docs.inmo.dev/tgbotapi/introduction/first-bot.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/including-in-your-project.html</loc> <loc>https://docs.inmo.dev/tgbotapi/introduction/including-in-your-project.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/proxy-setup.html</loc> <loc>https://docs.inmo.dev/tgbotapi/introduction/proxy-setup.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/api-extensions.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/api-extensions.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/behaviour-builder-with-fsm.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/behaviour-builder-with-fsm.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/behaviour-builder.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/behaviour-builder.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/exceptions-handling.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/exceptions-handling.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/files-handling.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/files-handling.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/low-level-work-with-bots.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/low-level-work-with-bots.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/media-groups.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/media-groups.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/types-conversations.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/types-conversations.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/logic/updates-with-flows.html</loc> <loc>https://docs.inmo.dev/tgbotapi/logic/updates-with-flows.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/updates/heroku.html</loc> <loc>https://docs.inmo.dev/tgbotapi/updates/heroku.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/updates/long-polling.html</loc> <loc>https://docs.inmo.dev/tgbotapi/updates/long-polling.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/updates/updates-filters.html</loc> <loc>https://docs.inmo.dev/tgbotapi/updates/updates-filters.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>https://docs.inmo.dev/tgbotapi/updates/webhooks.html</loc> <loc>https://docs.inmo.dev/tgbotapi/updates/webhooks.html</loc>
<lastmod>2024-05-15</lastmod> <lastmod>2024-05-29</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
</urlset> </urlset>
BIN
View File
Binary file not shown.
+113
View File
@@ -1389,6 +1389,39 @@
</span> </span>
</a> </a>
</li>
<li class="md-nav__item">
<a href="#long-polling" class="md-nav__link">
<span class="md-ellipsis">
Long polling
</span>
</a>
<nav class="md-nav" aria-label="Long polling">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#long-polling-from-buildbehaviour" class="md-nav__link">
<span class="md-ellipsis">
Long polling from buildBehaviour
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#long-polling-from-the-result-of-behaviour-building" class="md-nav__link">
<span class="md-ellipsis">
Long polling from the result of behaviour building
</span>
</a>
</li>
</ul>
</nav>
</li> </li>
</ul> </ul>
@@ -2404,6 +2437,39 @@
</span> </span>
</a> </a>
</li>
<li class="md-nav__item">
<a href="#long-polling" class="md-nav__link">
<span class="md-ellipsis">
Long polling
</span>
</a>
<nav class="md-nav" aria-label="Long polling">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#long-polling-from-buildbehaviour" class="md-nav__link">
<span class="md-ellipsis">
Long polling from buildBehaviour
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#long-polling-from-the-result-of-behaviour-building" class="md-nav__link">
<span class="md-ellipsis">
Long polling from the result of behaviour building
</span>
</a>
</li>
</ul>
</nav>
</li> </li>
</ul> </ul>
@@ -2492,6 +2558,53 @@
</span><span id="__span-2-9"><a id="__codelineno-2-9" name="__codelineno-2-9" href="#__codelineno-2-9"></a><span class="w"> </span><span class="p">}</span> </span><span id="__span-2-9"><a id="__codelineno-2-9" name="__codelineno-2-9" href="#__codelineno-2-9"></a><span class="w"> </span><span class="p">}</span>
</span><span id="__span-2-10"><a id="__codelineno-2-10" name="__codelineno-2-10" href="#__codelineno-2-10"></a><span class="p">}</span> </span><span id="__span-2-10"><a id="__codelineno-2-10" name="__codelineno-2-10" href="#__codelineno-2-10"></a><span class="p">}</span>
</span></code></pre></div> </span></code></pre></div>
<h2 id="long-polling">Long polling<a class="headerlink" href="#long-polling" title="Permanent link">&para;</a></h2>
<p>In case you wish to start long polling, you have two options:</p>
<ul>
<li>Start long polling with <code>buildBehaviour</code> additional functions</li>
<li>Start long polling from using the result of <code>buildBehaviour</code></li>
</ul>
<div class="admonition note">
<p class="admonition-title">More info</p>
<p>More info about updates retrieving you may read at the <a href="../updates/long-polling.html">Long Polling</a> and <a href="../updates/webhooks.html">Webhooks</a>
articles</p>
</div>
<h3 id="long-polling-from-buildbehaviour">Long polling from <code>buildBehaviour</code><a class="headerlink" href="#long-polling-from-buildbehaviour" title="Permanent link">&para;</a></h3>
<p>With prepared bot:</p>
<div class="language-kotlin highlight"><pre><span></span><code><span id="__span-3-1"><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">bot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">telegramBot</span><span class="p">(</span><span class="s">&quot;TOKEN&quot;</span><span class="p">)</span>
</span><span id="__span-3-2"><a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a>
</span><span id="__span-3-3"><a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a><span class="n">bot</span><span class="p">.</span><span class="na">buildBehaviourWithLongPolling</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-3-4"><a id="__codelineno-3-4" name="__codelineno-3-4" href="#__codelineno-3-4"></a><span class="w"> </span><span class="n">onCommand</span><span class="p">(</span>
</span><span id="__span-3-5"><a id="__codelineno-3-5" name="__codelineno-3-5" href="#__codelineno-3-5"></a><span class="w"> </span><span class="s">&quot;start&quot;</span><span class="p">,</span>
</span><span id="__span-3-6"><a id="__codelineno-3-6" name="__codelineno-3-6" href="#__codelineno-3-6"></a><span class="w"> </span><span class="n">requireOnlyCommandInMessage</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="c1">// it is default, but you can overwrite it with `requireOnlyCommandInMessage = false`</span>
</span><span id="__span-3-7"><a id="__codelineno-3-7" name="__codelineno-3-7" href="#__codelineno-3-7"></a><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-3-8"><a id="__codelineno-3-8" name="__codelineno-3-8" href="#__codelineno-3-8"></a><span class="w"> </span><span class="c1">// ...</span>
</span><span id="__span-3-9"><a id="__codelineno-3-9" name="__codelineno-3-9" href="#__codelineno-3-9"></a><span class="w"> </span><span class="p">}</span>
</span><span id="__span-3-10"><a id="__codelineno-3-10" name="__codelineno-3-10" href="#__codelineno-3-10"></a><span class="p">}</span>
</span></code></pre></div>
<p>Without prepared bot:</p>
<div class="language-kotlin highlight"><pre><span></span><code><span id="__span-4-1"><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="n">telegramBotWithBehaviourAndLongPolling</span><span class="p">(</span><span class="s">&quot;TOKEN&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-4-2"><a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="w"> </span><span class="n">onCommand</span><span class="p">(</span>
</span><span id="__span-4-3"><a id="__codelineno-4-3" name="__codelineno-4-3" href="#__codelineno-4-3"></a><span class="w"> </span><span class="s">&quot;start&quot;</span><span class="p">,</span>
</span><span id="__span-4-4"><a id="__codelineno-4-4" name="__codelineno-4-4" href="#__codelineno-4-4"></a><span class="w"> </span><span class="n">requireOnlyCommandInMessage</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="c1">// it is default, but you can overwrite it with `requireOnlyCommandInMessage = false`</span>
</span><span id="__span-4-5"><a id="__codelineno-4-5" name="__codelineno-4-5" href="#__codelineno-4-5"></a><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-4-6"><a id="__codelineno-4-6" name="__codelineno-4-6" href="#__codelineno-4-6"></a><span class="w"> </span><span class="c1">// ...</span>
</span><span id="__span-4-7"><a id="__codelineno-4-7" name="__codelineno-4-7" href="#__codelineno-4-7"></a><span class="w"> </span><span class="p">}</span>
</span><span id="__span-4-8"><a id="__codelineno-4-8" name="__codelineno-4-8" href="#__codelineno-4-8"></a><span class="p">}</span>
</span></code></pre></div>
<h3 id="long-polling-from-the-result-of-behaviour-building">Long polling from the result of behaviour building<a class="headerlink" href="#long-polling-from-the-result-of-behaviour-building" title="Permanent link">&para;</a></h3>
<div class="language-kotlin highlight"><pre><span></span><code><span id="__span-5-1"><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="kd">val</span><span class="w"> </span><span class="nv">bot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">telegramBot</span><span class="p">(</span><span class="s">&quot;TOKEN&quot;</span><span class="p">)</span>
</span><span id="__span-5-2"><a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a><span class="kd">val</span><span class="w"> </span><span class="nv">rootContext</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">bot</span><span class="p">.</span><span class="na">buildBehaviour</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-5-3"><a id="__codelineno-5-3" name="__codelineno-5-3" href="#__codelineno-5-3"></a><span class="w"> </span><span class="n">onCommand</span><span class="p">(</span>
</span><span id="__span-5-4"><a id="__codelineno-5-4" name="__codelineno-5-4" href="#__codelineno-5-4"></a><span class="w"> </span><span class="s">&quot;start&quot;</span><span class="p">,</span>
</span><span id="__span-5-5"><a id="__codelineno-5-5" name="__codelineno-5-5" href="#__codelineno-5-5"></a><span class="w"> </span><span class="n">requireOnlyCommandInMessage</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="c1">// it is default, but you can overwrite it with `requireOnlyCommandInMessage = false`</span>
</span><span id="__span-5-6"><a id="__codelineno-5-6" name="__codelineno-5-6" href="#__codelineno-5-6"></a><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-5-7"><a id="__codelineno-5-7" name="__codelineno-5-7" href="#__codelineno-5-7"></a><span class="w"> </span><span class="c1">// ...</span>
</span><span id="__span-5-8"><a id="__codelineno-5-8" name="__codelineno-5-8" href="#__codelineno-5-8"></a><span class="w"> </span><span class="p">}</span>
</span><span id="__span-5-9"><a id="__codelineno-5-9" name="__codelineno-5-9" href="#__codelineno-5-9"></a><span class="p">}</span>
</span><span id="__span-5-10"><a id="__codelineno-5-10" name="__codelineno-5-10" href="#__codelineno-5-10"></a>
</span><span id="__span-5-11"><a id="__codelineno-5-11" name="__codelineno-5-11" href="#__codelineno-5-11"></a><span class="n">bot</span><span class="p">.</span><span class="na">longPolling</span><span class="p">(</span><span class="n">rootContext</span><span class="p">)</span><span class="w"> </span><span class="c1">// start listening updates</span>
</span></code></pre></div>