コード例 #1
0
        public async void SendMessage(TelegramBotClient botClient)
        {
            await botClient.DeleteMessageAsync(_message.From.Id, _message.MessageId);

            if (user == null)
            {
                user = db.LoadRecordById <User>("Users", _message.From.Id);
                await Task.Run(() => botClient.SendText(_message.From.Id, TextMessage, user, replyMarkup: InlineButton.Start()));
            }
            else
            {
                user = db.LoadRecordById <User>("Users", _message.From.Id);
                await Task.Run(() => botClient.SendText(_message.From.Id, TextMessage, user, replyMarkup: InlineButton.Menu(user)));
            }
        }
コード例 #2
0
 public async void SendMessage(TelegramBotClient botClient)
 {
     await Task.Run(() => botClient.EditMessage(_message.From.Id, user.MessageId, TextMessage, "53 - Russian", user, replyMarkup: InlineButton.Start()));
 }