mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-04 15:49:41 +00:00
add notice about privacy handling
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
import dev.inmo.kslog.common.e
|
||||
import dev.inmo.micro_utils.coroutines.ContextSafelyExceptionHandler
|
||||
import dev.inmo.micro_utils.coroutines.ExceptionHandler
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
@@ -8,6 +9,7 @@ import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.startGettingOfUpdat
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMediaGroupsAdaptation
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||
import kotlinx.coroutines.*
|
||||
|
||||
/**
|
||||
@@ -70,6 +72,9 @@ suspend fun TelegramBot.buildBehaviourWithLongPolling(
|
||||
defaultExceptionsHandler = defaultExceptionsHandler,
|
||||
block = block
|
||||
)
|
||||
if (!behaviourContext.triggersHolder.handleableCommandsHolder.isHandled("privacy")) {
|
||||
DefaultKTgBotAPIKSLog.e { "For some or bots there is no handling \"privacy\" command. According to https://telegram.org/tos/bot-developers#4-privacy it may lead to bot deactivation or removing" }
|
||||
}
|
||||
return longPolling(
|
||||
behaviourContext,
|
||||
scope = behaviourContext,
|
||||
|
Reference in New Issue
Block a user