예제 #1
0
        //QuoteCoin
        private async Task <IMessageActivity> ReplyMessageCoins(IDialogContext context, LuisResult result)
        {
            RootObject moedas = ApiCotacao.ValorMoeda();

            IMessageActivity reply = context.MakeMessage();

            reply.AttachmentLayout = AttachmentLayoutTypes.Carousel;
            reply.Attachments      = await getAttachment.GetCarouselAllCoin(moedas);

            return(reply);
        }
예제 #2
0
        //QuoteCoin
        private async Task <IMessageActivity> ReplyMessageWithQuote(IDialogContext context, LuisResult result)
        {
            RootObject moeda = ApiCotacao.ValorMoeda();

            if (moeda.status == false)
            {
                IMessageActivity reply = context.MakeMessage();
                reply.Text = $"Me desculpe. Não consegui encontrar a moeda { result.Entities[0].Entity.ToUpper()}.";
                return(reply);
            }
            else
            {
                IMessageActivity reply = context.MakeMessage();
                reply.AttachmentLayout = AttachmentLayoutTypes.Carousel;
                reply.Attachments      = await getAttachment.informationQuotes(moeda, result);

                return(reply);
            }
        }