mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 08:37:12 +00:00
fix of message about /privacy handling absence
This commit is contained in:
parent
6a2e8400c1
commit
f8e87ac49b
@ -4,6 +4,7 @@ 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
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.extensions.DefaultKTgBotAPIPrivacyCommand
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.longPolling
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.startGettingOfUpdatesByLongPolling
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMediaGroupsAdaptation
|
||||
@ -72,8 +73,8 @@ 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" }
|
||||
if (!behaviourContext.triggersHolder.handleableCommandsHolder.isHandled(DefaultKTgBotAPIPrivacyCommand)) {
|
||||
DefaultKTgBotAPIKSLog.e { "Currently, there are no any handling of \"$DefaultKTgBotAPIPrivacyCommand\" command. According to https://telegram.org/tos/bot-developers#4-privacy it may lead to bot deactivation or removing" }
|
||||
}
|
||||
return longPolling(
|
||||
behaviourContext,
|
||||
|
Loading…
Reference in New Issue
Block a user