public override async void Action(object stateInfo) { ImgurPicture picture = await FunctionToUse(Query); if (picture != null) { await ChannelRequested.SendMessageAsync($"{picture.title ?? ""}\n{picture.link}"); } else { await ChannelRequested.SendMessageAsync("Slow the meme train"); } }
public async Task Echo([Remainder, Summary("query")] string query) { ImgurPicture picture = await(Service as ImgurService).GetImage(query); if (picture != null) { await ReplyAsync($"{picture.title ?? ""}\n{picture.link}"); } else { await ReplyAsync("Slow the meme train"); } }