Esempio n. 1
0
 public void RepresentList(
     MenuViewModel menuView,
     TelegramMessageService messageService,
     IBotInputChat chat
     ) => messageService.SendText(
     chat,
     menuView.Header,
     CreateInlineKeyBoard(menuView.Buttons)
     );
Esempio n. 2
0
 public void RepresentString(
     StringViewModel stringViewModel,
     TelegramMessageService messageService,
     IBotInputChat chat
     ) => messageService.SendText(
     chat,
     stringViewModel.Value,
     new ReplyKeyboardMarkup {
     Keyboard = new [] {
         new [] {
             new KeyboardButton {
                 Text = stringViewModel.Tip
             },
         }
     },
     OneTimeKeyboard = true,
 }
     );
Esempio n. 3
0
        public void RepresentCardPage(
            CardPageView cardPage,
            TelegramMessageService messageService,
            IBotInputChat chat
            )
        {
            messageService.SendText(chat, cardPage.Header);
            messageService.SendMediaBulk(chat, cardPage.Cards.SkipLast(1).Select(CardToMediaDto));
            var lastCard = cardPage.Cards.Last();

            messageService.SendMedia(
                chat,
                lastCard.MediaUrl,
                lastCard.Content,
                CreateInlineKeyBoard(
                    ArrayFrom(
                        lastCard.Actions,
                        cardPage.Actions
                        )
                    )
                );
        }