complete sample with native

This commit is contained in:
InsanusMokrassar committed 2023-04-19 20:20:11 +06:00
1 parent 7b996fe1de
commit c6019b1862
15 files changed
+100 -158

No files matched your search

@@ -15,11 +15,7 @@ suspend fun activateResenderBot(
token: String,
print: (Any) -> Unit
) {
val bot = telegramBot(token)
print(bot.getMe())
bot.buildBehaviourWithLongPolling(CoroutineScope(currentCoroutineContext() + SupervisorJob())) {
telegramBotWithBehaviourAndLongPolling(token, scope = CoroutineScope(currentCoroutineContext() + SupervisorJob())) {
onContentMessage(
subcontextUpdatesFilter = MessageFilterByChat,
) {
@@ -43,5 +39,6 @@ suspend fun activateResenderBot(
allUpdatesFlow.subscribeSafelyWithoutExceptions(this) {
println(it)
}
}.join()
print(bot.getMe())
}.second.join()
}