コード例 #1
0
        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");
            }
        }
コード例 #2
0
        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");
            }
        }