Tigran před 4 roky
rodič
revize
5e79bf25a9
1 změnil soubory, kde provedl 1 přidání a 10 odebrání
  1. 1 10
      MafiaTelegramBot/Bot.cs

+ 1 - 10
MafiaTelegramBot/Bot.cs

@@ -9,17 +9,8 @@ namespace MafiaTelegramBot
     public static class Bot
     {
         private static TelegramBotClient _client;
+        public static TelegramBotClient Client => _client ??= new TelegramBotClient(AppSettings.Token);
 
-        public static TelegramBotClient Client
-        {
-            get
-            {
-                if (_client != null) return _client;
-                _client = new TelegramBotClient(AppSettings.Token);
-                return _client;
-            }
-        }
-        
         public static void Main()
         {
             var cts = new CancellationTokenSource();