Collection.cs 1.0 KB

123456789101112131415161718192021222324252627
  1. using System.Threading.Tasks;
  2. using CardCollector.DataBase.Entity;
  3. using CardCollector.Resources;
  4. using CardCollector.Session.Modules;
  5. using Telegram.Bot.Types;
  6. namespace CardCollector.Commands.Message
  7. {
  8. /* Реализует команду "Коллекция" */
  9. public class Collection : MessageCommand
  10. {
  11. protected override string CommandText => Text.collection;
  12. public override async Task Execute()
  13. {
  14. /* Очищаем чат с пользователем */
  15. await User.ClearChat();
  16. /* Переводим состояние пользователя в меню коллекции */
  17. User.Session.State = UserState.CollectionMenu;
  18. User.Session.InitNewModule<CollectionModule>();
  19. /* Отображаем сообщение с фильтрами */
  20. await new ShowFiltersMenu(User, Update).Execute();
  21. }
  22. public Collection() { }
  23. public Collection(UserEntity user, Update update) : base(user, update) { }
  24. }
  25. }