Exemplo n.º 1
0
        private void _OnStatsRequest()
        {
            var hintStats = string.Join("\n", _dataManager.GetHintStats());

            SendTextMessageAsync(_questMasterChatId, hintStats,
                                 replyMarkup: KeyboardLayoutsStorage.GetDefaultKeyboard());
        }
Exemplo n.º 2
0
        private void _OnPhotoSent(MessageEventArgs messageEventArgs, string teamName)
        {
            var chat                 = messageEventArgs.Message.Chat;
            var chatId               = chat.Id;
            var firstName            = chat.FirstName;
            var lastName             = chat.LastName;
            var messageId            = messageEventArgs.Message.MessageId;
            var currentLocation      = _dataManager.GetLocationNameFor(chatId);
            var currentLocationIndex = _dataManager.GetLocationIndexFor(chatId);

            ForwardMessageAsync(_questMasterChatId, chatId, messageEventArgs.Message.MessageId).Wait();
#pragma warning disable CS4014
            SendTextMessageAsync(_questMasterChatId,
                                 $"{firstName} {lastName} ({teamName}) надсилає фото до загадки для {currentLocation}",
                                 replyMarkup: KeyboardLayoutsStorage.GetAnswerVerificationReplyMarkup(chatId, messageId, currentLocationIndex));
            SendTextMessageAsync(chatId, "Відповідь прийнято.");
#pragma warning restore CS4014
        }
Exemplo n.º 3
0
 private Task <Message> SendAdminActionMessageAsync(long chatId, string message)
 => SendTextMessageAsync(chatId, message,
                         replyMarkup: KeyboardLayoutsStorage.GetAdminActionReplyMarkup());
Exemplo n.º 4
0
 private Task <Message> SendMessageWithSendContactButtons(long chatId, string message)
 => SendTextMessageAsync(chatId, message,
                         replyMarkup: KeyboardLayoutsStorage.GetRequestContactReplyMarkup());