1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

fix of message about /privacy handling absence

This commit is contained in:
InsanusMokrassar 2024-07-11 21:09:29 +06:00
parent 6a2e8400c1
commit f8e87ac49b

View File

@ -4,6 +4,7 @@ import dev.inmo.kslog.common.e
import dev.inmo.micro_utils.coroutines.ContextSafelyExceptionHandler import dev.inmo.micro_utils.coroutines.ContextSafelyExceptionHandler
import dev.inmo.micro_utils.coroutines.ExceptionHandler import dev.inmo.micro_utils.coroutines.ExceptionHandler
import dev.inmo.tgbotapi.bot.TelegramBot 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.longPolling
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.startGettingOfUpdatesByLongPolling import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.startGettingOfUpdatesByLongPolling
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMediaGroupsAdaptation import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMediaGroupsAdaptation
@ -72,8 +73,8 @@ suspend fun TelegramBot.buildBehaviourWithLongPolling(
defaultExceptionsHandler = defaultExceptionsHandler, defaultExceptionsHandler = defaultExceptionsHandler,
block = block block = block
) )
if (!behaviourContext.triggersHolder.handleableCommandsHolder.isHandled("privacy")) { if (!behaviourContext.triggersHolder.handleableCommandsHolder.isHandled(DefaultKTgBotAPIPrivacyCommand)) {
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" } 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( return longPolling(
behaviourContext, behaviourContext,