Esempio n. 1
0
        public async Task GetCirculanteAsync()
        {
            try
            {
                using (Context.Channel.EnterTypingState())
                {
                    BcraResponse result = await BcraService.GetCirculatingMoney();

                    if (result != null)
                    {
                        EmbedBuilder embed = await BcraService.CreateCirculatingMoneyEmbedAsync(result);

                        embed.AddCommandDeprecationNotice(Configuration);
                        await ReplyAsync(embed : embed.Build());
                    }
                    else
                    {
                        await ReplyAsync(REQUEST_ERROR_MESSAGE);
                    }
                }
            }
            catch (Exception ex)
            {
                await SendErrorReply(ex);
            }
        }
 public async Task GetCirculanteAsync()
 {
     await DeferAsync().ContinueWith(async(task) =>
     {
         try
         {
             BcraResponse result = await BcraService.GetCirculatingMoney();
             if (result != null)
             {
                 EmbedBuilder embed = await BcraService.CreateCirculatingMoneyEmbedAsync(result);
                 await SendDeferredEmbedAsync(embed.Build());
             }
             else
             {
                 await SendDeferredApiErrorResponseAsync();
             }
         }
         catch (Exception ex)
         {
             await SendDeferredErrorResponseAsync(ex);
         }
     });
 }