Payment.cs 987 B

12345678910111213141516171819202122232425262728
  1. #nullable enable
  2. using System;
  3. using System.Threading.Tasks;
  4. using Telegram.Bot.Types;
  5. namespace MafiaTelegramBot.Models.Payments
  6. {
  7. public abstract class Payment : UpdateModel<string>
  8. {
  9. protected override bool IsMatches(string command)
  10. {
  11. return command == Name;
  12. }
  13. public static Task<Message> Update(Update update)
  14. {
  15. throw new NotImplementedException();
  16. /*var payments = Bot.Payments;
  17. var message = update.PreCheckoutQuery;
  18. var userId = update.Message.From.Id;
  19. var chatId = update.Message.Chat.Id;
  20. await Bot.Get().SendChatActionAsync(chatId, ChatAction.Typing);
  21. var command = FirstOrDefault(payments, message);
  22. if(command != null) return await ((Payment?) command.Clone(chatId, userId))!.Execute(update);
  23. return await Bot.SendWithMarkdown2(chatId, $"{strings.command_not_found} _*({"message"})*_");*/
  24. }
  25. }
  26. }