Exemplo n.º 1
0
 public async Task NextLaunches(int count = 1)
 {
     if (count == 1)
     {
         await ReplyAsync(await _spacex.NextLaunch().DiscordEmbed());
     }
     else
     {
         var launches = (await _spacex.Upcoming()).Where(a => a.LaunchDateUtc.HasValue).OrderBy(a => a.LaunchDateUtc.Value).Take(count).ToArray();
         await DisplayItemList(
             launches,
             () => "There are no upcoming SpaceX launches!",
             null,
             (l, i) => l.Summary()
             );
     }
 }