Tigran 4 年之前
父節點
當前提交
5e79bf25a9
共有 1 個文件被更改,包括 1 次插入10 次删除
  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();