Migrate to Telegram.Bot v22 and some minor improvements

This commit is contained in:
2024-11-05 17:25:29 +03:30
parent 0830847336
commit 51747b3e3d
11 changed files with 53 additions and 31 deletions

View File

@@ -14,7 +14,7 @@ namespace CatsOfMastodonBot.Models
string tag = DotNetEnv.Env.GetString("TAG") ?? Environment.GetEnvironmentVariable("TAG");
string channelNumId = DotNetEnv.Env.GetString("CHANNEL_NUMID") ?? Environment.GetEnvironmentVariable("CHANNEL_NUMID");
string adminNumId = DotNetEnv.Env.GetString("ADMIN_NUMID") ?? Environment.GetEnvironmentVariable("ADMIN_NUMID");
string instance = DotNetEnv.Env.GetString("INSTANCE") ?? Environment.GetEnvironmentVariable("INSTANCE");
string? instance = DotNetEnv.Env.GetString("INSTANCE") ?? Environment.GetEnvironmentVariable("INSTANCE");
// Check if any of the values are still null or empty
if (string.IsNullOrEmpty(dbName) || string.IsNullOrEmpty(botToken) || string.IsNullOrEmpty(tag)