public async Task ExecuteGroupAsync(CommandContext ctx) { string?joke = await JokesService.GetRandomJokeAsync(); if (joke is null) { await ctx.FailAsync("cmd-err-res-none"); } else { await ctx.Channel.EmbedAsync(joke, Emojis.Joy, this.ModuleColor); } }
public async Task GetRandomJokeAsyncTest() { Assert.IsNotNull(await JokesService.GetRandomJokeAsync()); }
public async Task ExecuteGroupAsync(CommandContext ctx) { string joke = await JokesService.GetRandomJokeAsync(); await this.InformAsync(ctx, joke, ":joy:"); }