Browse Source

add first btn

DarkGolly 4 years ago
parent
commit
1268083384

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

@@ -15,7 +15,7 @@ namespace CardCollector.Commands.Message
     {
         private static readonly List<Message> List = new()
         {
-
+            new ProfileMessage()
         };
 
         public static async Task<UpdateModel> Factory(Update update)

+ 31 - 0
CardCollector/Commands/Message/ProfileMessage.cs

@@ -0,0 +1,31 @@
+using System.Threading.Tasks;
+using CardCollector.Controllers;
+using CardCollector.DataBase.Entity;
+using Telegram.Bot.Types;
+using Telegram.Bot.Types.ReplyMarkups;
+
+namespace CardCollector.Commands.Message
+{
+    public class ProfileMessage:Message
+    {
+        public ProfileMessage():base(null,null)
+        {
+            
+        }
+        public ProfileMessage(UserEntity user, Update update) : base(user, update)
+        {
+            
+        }
+
+        protected override string Command => "Профиль";
+        public override async Task<Telegram.Bot.Types.Message> Execute()
+        {
+            var keyboard = new InlineKeyboardMarkup(new[]
+                {
+                    InlineKeyboardButton.WithCallbackData("Собрать прибыль")
+                }
+            );
+            return await MessageController.SendMessage(User,$"{User.Username}", keyboard);
+        }
+    }
+}