Issue fixed for no Raw message Result and Device Session extended

This commit is contained in:
FlorianDahn 2019-02-19 19:20:01 +01:00
parent 04f7dde3dd
commit 04d7a52921
2 changed files with 13 additions and 2 deletions

View File

@ -64,7 +64,7 @@ namespace TelegramBotBase.Base
{ {
get get
{ {
return this.RawCallbackData.CallbackQuery.Data; return this.RawCallbackData?.CallbackQuery?.Data;
} }
} }

View File

@ -7,6 +7,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Telegram.Bot.Exceptions;
using Telegram.Bot.Types; using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums; using Telegram.Bot.Types.Enums;
using Telegram.Bot.Types.InputFiles; using Telegram.Bot.Types.InputFiles;
@ -296,7 +297,7 @@ namespace TelegramBotBase.Sessions
return true; return true;
} }
catch catch(ApiRequestException ex)
{ {
} }
@ -304,6 +305,16 @@ namespace TelegramBotBase.Sessions
return false; return false;
} }
/// <summary>
/// Löscht die aktuelle Nachricht, oder die übergebene
/// </summary>
/// <param name="messageId"></param>
/// <returns></returns>
public virtual async Task<bool> DeleteMessage(Message message)
{
return await DeleteMessage(message.MessageId);
}
public event EventHandler<MessageSentEventArgs> MessageSent public event EventHandler<MessageSentEventArgs> MessageSent
{ {