public Task ProcessAsync(BotRoutingContext context)
 => context.AnswerInlineQueryAsync(
     InlineQueryResponseComposer.InvalidCommand(
         new CommandInlineQuery(
             context.GetInlineQuery()
             ).Command
         )
     );
Ejemplo n.º 2
0
        public override async Task ProcessAsync(BotRoutingContext context)
        {
            var results = context
                          .SearchByCommand()
                          .Select(x => InlineQueryResponseComposer.GetArticleResult(x, true))
                          .AddSearchTips(ResultType.SearchShort)
                          .Take(50);

            context.RecordGenerationSegmentTime();
            await context.AnswerInlineQueryAsync(results);
        }
Ejemplo n.º 3
0
        public override async Task ProcessAsync(BotRoutingContext context)
        {
            var results = context
                          .SearchByCommand()
                          .OrderByDescending(x => x.DateClose - x.DateOpen)
                          .Select(x => InlineQueryResponseComposer.GetArticleResult(x))
                          .AddSearchTips(ResultType.Oldest)
                          .Take(50);

            context.RecordGenerationSegmentTime();
            await context.AnswerInlineQueryAsync(results);
        }