Added json field checks
This commit is contained in:
parent
8ab6b9d986
commit
268bbdf9b7
20
Program.cs
20
Program.cs
@ -15,12 +15,22 @@ namespace TeleTok
|
||||
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
//Checks if the config json data is valid
|
||||
if(token == "" || token == null || token == "INSERT TOKEN HERE")
|
||||
{
|
||||
LogMessage("Telegram bot token is invalid! Exiting...");
|
||||
}
|
||||
else if(ptInstance == "" || ptInstance == null || ptInstance == "PROXITOK INSTANCE URL")
|
||||
{
|
||||
LogMessage("Proxitok instance is invalid! Exiting...");
|
||||
}
|
||||
else
|
||||
{
|
||||
TelegramListener listener = new TelegramListener();
|
||||
Console.WriteLine("Now listening...");
|
||||
|
||||
TelegramListener listener = new TelegramListener();
|
||||
Console.WriteLine("Now listening...");
|
||||
|
||||
listener.RunListener();
|
||||
|
||||
listener.RunListener();
|
||||
}
|
||||
}
|
||||
|
||||
public static void LogMessage(string text)
|
||||
|
Loading…
Reference in New Issue
Block a user