From d66df4978d812f589f8209c32eedc1f1d25d79c4 Mon Sep 17 00:00:00 2001 From: FlorianDahn Date: Tue, 28 Apr 2020 20:17:18 +0200 Subject: [PATCH] Create Program.cs --- Examples/SystemCommandsBot/Program.cs | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Examples/SystemCommandsBot/Program.cs diff --git a/Examples/SystemCommandsBot/Program.cs b/Examples/SystemCommandsBot/Program.cs new file mode 100644 index 0000000..efe0e93 --- /dev/null +++ b/Examples/SystemCommandsBot/Program.cs @@ -0,0 +1,36 @@ +using System; + +namespace SystemCommandsBot +{ + class Program + { + public static config.Config BotConfig { get; set; } + + + static void Main(string[] args) + { + + BotConfig = config.Config.load(); + + if (BotConfig.ApiKey == null || BotConfig.ApiKey.Trim() == "") + { + Console.WriteLine("Config created..."); + Console.ReadLine(); + return; + } + + var bot = new TelegramBotBase.BotBase(BotConfig.ApiKey); + + bot.Start(); + + Console.WriteLine("Bot started"); + + Console.ReadLine(); + + + bot.Stop(); + + + } + } +}