Esempio n. 1
0
 public async void SendMessage(TelegramBotClient botClient)
 {
     await Task.Run(() => botClient.EditMessage(_message.From.Id, user.MessageId, TextMessage, "50 - FindAnArtistBackToMenu", user, replyMarkup: InlineButton.Menu(user)));
 }
Esempio n. 2
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)));
            }
        }