ok
This commit is contained in:
@@ -13,14 +13,14 @@ namespace RgDevBot
|
|||||||
var token = Environment.GetEnvironmentVariable("TELEGRAM_TOKEN");
|
var token = Environment.GetEnvironmentVariable("TELEGRAM_TOKEN");
|
||||||
if (string.IsNullOrEmpty(token))
|
if (string.IsNullOrEmpty(token))
|
||||||
{
|
{
|
||||||
Console.WriteLine("Please define TELEGRAM_TOKEN variable.");
|
throw new Exception("Please define TELEGRAM_TOKEN variable.");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
int.TryParse(Environment.GetEnvironmentVariable("TELEGRAM_CHAT_ID"), out var chatId);
|
|
||||||
|
long.TryParse(Environment.GetEnvironmentVariable("TELEGRAM_CHAT_ID"), out var chatId);
|
||||||
if (chatId == 0)
|
if (chatId == 0)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Please define TELEGRAM_CHAT_ID variable.");
|
throw new Exception("Please define TELEGRAM_CHAT_ID variable.");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MainChatId = chatId;
|
MainChatId = chatId;
|
||||||
|
|||||||
Reference in New Issue
Block a user