Tigran пре 3 година
родитељ
комит
67629a8051

+ 1 - 1
CardCollector/Commands/ChosenInlineResult/SelectStickerInlineResult.cs

@@ -49,7 +49,7 @@ namespace CardCollector.Commands.ChosenInlineResult
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
             return base.IsMatches(user, update) && 
-                   User.Session.State is UserState.CollectionMenu or UserState.AuctionMenu or UserState.CombineMenu or UserState.Default;
+                   user.Session.State is UserState.CollectionMenu or UserState.AuctionMenu or UserState.CombineMenu or UserState.Default;
         }
 
         public SelectStickerInlineResult() { }

+ 1 - 1
CardCollector/Commands/InlineQuery/ShowAuctionStickers.cs

@@ -28,7 +28,7 @@ namespace CardCollector.Commands.InlineQuery
 
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return update.InlineQuery?.ChatType is ChatType.Sender && User.Session.State == UserState.AuctionMenu;
+            return update.InlineQuery?.ChatType is ChatType.Sender && user.Session.State == UserState.AuctionMenu;
         }
 
         public ShowAuctionStickers() { }

+ 1 - 1
CardCollector/Commands/InlineQuery/ShowCollectionStickers.cs

@@ -23,7 +23,7 @@ namespace CardCollector.Commands.InlineQuery
         
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return update.InlineQuery?.ChatType is ChatType.Sender && User.Session.State == UserState.CollectionMenu;
+            return update.InlineQuery?.ChatType is ChatType.Sender && user.Session.State == UserState.CollectionMenu;
         }
 
         public ShowCollectionStickers() { }

+ 1 - 1
CardCollector/Commands/InlineQuery/ShowCombineStickers.cs

@@ -23,7 +23,7 @@ namespace CardCollector.Commands.InlineQuery
         
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return update.InlineQuery?.ChatType is ChatType.Sender && User.Session.State == UserState.CombineMenu;
+            return update.InlineQuery?.ChatType is ChatType.Sender && user.Session.State == UserState.CombineMenu;
         }
 
         public ShowCombineStickers() { }

+ 1 - 1
CardCollector/Commands/InlineQuery/ShowStickersInBotChat.cs

@@ -25,7 +25,7 @@ namespace CardCollector.Commands.InlineQuery
 
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return update.InlineQuery?.ChatType is ChatType.Sender && User.Session.State == UserState.Default;
+            return update.InlineQuery?.ChatType is ChatType.Sender && user.Session.State == UserState.Default;
         }
 
         public ShowStickersInBotChat() { }

+ 1 - 1
CardCollector/Commands/InlineQuery/ShowTradersInBotChat.cs

@@ -26,7 +26,7 @@ namespace CardCollector.Commands.InlineQuery
         
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return update.InlineQuery?.ChatType is ChatType.Sender && User.Session.State == UserState.ProductMenu;
+            return update.InlineQuery?.ChatType is ChatType.Sender && user.Session.State == UserState.ProductMenu;
         }
 
         public ShowTradersInBotChat() { }

+ 1 - 1
CardCollector/Commands/Message/DocumentMessage/UploadFileMessage.cs

@@ -177,7 +177,7 @@ namespace CardCollector.Commands.Message.DocumentMessage
 
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return User.Session.State == UserState.UploadFile;
+            return user.Session.State == UserState.UploadFile;
         }
 
         public UploadFileMessage() { }

+ 1 - 1
CardCollector/Commands/Message/TextMessage/DownloadStickerPackMessage.cs

@@ -19,7 +19,7 @@ namespace CardCollector.Commands.Message.TextMessage
 
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return base.IsMatches(user, update) && User.PrivilegeLevel >= Constants.ARTIST_PRIVILEGE_LEVEL;
+            return base.IsMatches(user, update) && user.PrivilegeLevel >= Constants.ARTIST_PRIVILEGE_LEVEL;
         }
 
         public DownloadStickerPackMessage() { }

+ 1 - 1
CardCollector/Commands/Message/TextMessage/EnterEmojiMessage.cs

@@ -56,7 +56,7 @@ namespace CardCollector.Commands.Message.TextMessage
 
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return Queue.ContainsKey(User.Id) && update.Message!.Type == MessageType.Text;
+            return Queue.ContainsKey(user.Id) && update.Message!.Type == MessageType.Text;
         }
 
         public EnterEmojiMessage() { }

+ 1 - 1
CardCollector/Commands/Message/TextMessage/EnterGemsPriceMessage.cs

@@ -46,7 +46,7 @@ namespace CardCollector.Commands.Message.TextMessage
         // Переопределяем метод, так как команда удовлетворяет условию, если пользователь находится в очереди #1#
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return Queue.ContainsKey(User.Id) && update.Message!.Type == MessageType.Text;
+            return Queue.ContainsKey(user.Id) && update.Message!.Type == MessageType.Text;
         }
 
         public EnterGemsPriceMessage() { }

+ 1 - 1
CardCollector/Commands/Message/TextMessage/ShowSampleMessage.cs

@@ -25,7 +25,7 @@ namespace CardCollector.Commands.Message.TextMessage
         /* Нужно помимо совпадения текста проверить пользователя на уровень привилегий */
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return base.IsMatches(user, update) && User.PrivilegeLevel >= Constants.PROGRAMMER_PRIVILEGE_LEVEL;
+            return base.IsMatches(user, update) && user.PrivilegeLevel >= Constants.PROGRAMMER_PRIVILEGE_LEVEL;
         }
         
         public ShowSampleMessage(UserEntity user, Update update) : base(user, update) { }

+ 1 - 1
CardCollector/Commands/Message/TextMessage/StopBot.cs

@@ -19,7 +19,7 @@ namespace CardCollector.Commands.Message.TextMessage
 
         protected internal override bool IsMatches(UserEntity user, Update update)
         {
-            return base.IsMatches(user, update) && User.PrivilegeLevel >= Constants.PROGRAMMER_PRIVILEGE_LEVEL;
+            return base.IsMatches(user, update) && user.PrivilegeLevel >= Constants.PROGRAMMER_PRIVILEGE_LEVEL;
         }
 
         public StopBot() { }

+ 1 - 1
CardCollector/Resources/Constants.cs

@@ -7,7 +7,7 @@ namespace CardCollector.Resources
     public static class Constants
     {
         /* Переключить данный флаг при сборке на сервер */
-        public const bool DEBUG = false;
+        public const bool DEBUG = true;
 
         /* Интервал сохранения изменений */
         public const double SAVING_CHANGES_INTERVAL = DEBUG ? 10 * 1000 : 5 * 60 * 1000;