From eef023d668cc0eaae8724b4331452cd8ac6bfd80 Mon Sep 17 00:00:00 2001 From: Ayrat Hudaygulov Date: Tue, 26 Sep 2023 21:08:17 +0100 Subject: [PATCH] changed start msg --- src/VahterBanBot/Program.fs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/VahterBanBot/Program.fs b/src/VahterBanBot/Program.fs index 92c6518..aed1904 100644 --- a/src/VahterBanBot/Program.fs +++ b/src/VahterBanBot/Program.fs @@ -75,7 +75,19 @@ app.UseGiraffe(webApp) let server = app.RunAsync() let telegramClient = app.Services.GetRequiredService() -telegramClient.SendTextMessageAsync(ChatId(botConf.LogsChannelId), "Bot started").Wait() -app.Logger.LogInformation("Bot started") +let startLogMsg = + let sb = System.Text.StringBuilder() + %sb.AppendLine("Bot started with following configuration") + %sb.AppendLine("AllowedUsers:") + for KeyValue(username, userId) in botConf.AllowedUsers do + %sb.AppendLine($" {username} ({userId})") + %sb.AppendLine("ChatsToMonitor:") + for KeyValue(username, chatId) in botConf.ChatsToMonitor do + %sb.AppendLine($" {username} ({chatId})") + sb.ToString() + +app.Logger.LogInformation startLogMsg +telegramClient.SendTextMessageAsync(ChatId(botConf.LogsChannelId), startLogMsg).Wait() + server.Wait()