Tigran 4 years ago
parent
commit
5e79bf25a9
1 changed files with 1 additions and 10 deletions
  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();