From 45383f472083f1fb0d5e07f068493f80289a5344 Mon Sep 17 00:00:00 2001 From: Ayrat Hudaygulov Date: Tue, 26 Sep 2023 22:22:23 +0100 Subject: [PATCH] changed back to id --- src/VahterBanBot/Bot.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/VahterBanBot/Bot.fs b/src/VahterBanBot/Bot.fs index df1d915..36502f8 100644 --- a/src/VahterBanBot/Bot.fs +++ b/src/VahterBanBot/Bot.fs @@ -22,13 +22,13 @@ let isBanOnReplyMessage (message: Message) = message.ReplyToMessage <> null let isMessageFromAllowedChats (botConfig: BotConfiguration) (message: Message) = - botConfig.ChatsToMonitor.ContainsKey message.Chat.Username + botConfig.ChatsToMonitor.ContainsValue message.Chat.Id let isMessageFromAdmin (botConfig: BotConfiguration) (message: Message) = - botConfig.AllowedUsers.ContainsKey message.From.Username + botConfig.AllowedUsers.ContainsValue message.From.Id let isBannedPersonAdmin (botConfig: BotConfiguration) (message: Message) = - botConfig.AllowedUsers.ContainsKey message.ReplyToMessage.From.Username + botConfig.AllowedUsers.ContainsValue message.ReplyToMessage.From.Id let isBanAuthorized (botConfig: BotConfiguration) (message: Message) (logger: ILogger) = let fromUserId = message.From.Id