Skip to content

Commit

Permalink
logging on auto-ban (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Szer authored Aug 7, 2024
1 parent 3501132 commit f2b1c59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/VahterBanBot/Bot.fs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ let autoBan
if double socialScore <= botConfig.MlSpamAutobanScoreThreshold then
// ban user in all monitored chats
do! totalBan botClient botConfig message botUser logger
let msg = $"Auto-banned user {prependUsername message.From.Username} ({message.From.Id}) due to the low social score {socialScore}"
logger.LogInformation msg
do! botClient.SendTextMessageAsync(ChatId(botConfig.LogsChannelId), msg) |> taskIgnore
}

let justMessage
Expand Down

0 comments on commit f2b1c59

Please sign in to comment.