/// <summary> /// Answer to an inline query request. Only works when <see cref="UpdateType"/> is <see cref="UpdateType.InlineQuery"/>. /// </summary> public static async Task AnswerInlineQueryAsync( this BotRoutingContext context, IEnumerable <InlineQueryResultBase> results) { context.EnsureSegment(); await context.BotClient.AnswerInlineQueryAsync( inlineQueryId : context.Update.InlineQuery.Id, results : results, isPersonal : false ); context.RecordSendingSegmentTime(); }
/// <summary> /// Send text reply to a message. Only works when <see cref="UpdateType"/> is <see cref="UpdateType.Message"/>. /// </summary> public static async Task ReplyTextMessageAsync( this BotRoutingContext context, string text, ParseMode parseMode = ParseMode.Default, bool disableWebPagePreview = false, bool disableNotification = false) { context.EnsureSegment(); await context.BotClient.SendTextMessageAsync( context.Update.Message.Chat.Id, text, parseMode, disableWebPagePreview, disableNotification, context.Update.Message.MessageId ); context.RecordSendingSegmentTime(); }