예제 #1
0
        public async Task <BooruSharp.Search.Post.SearchResult> Xbooru(IUser usr, IGuild guild, ICommandContext context, string tag = "thighhighs")
        {
            var Booru = new BooruSharp.Booru.Xbooru();

            BooruSharp.Search.Post.SearchResult result = new BooruSharp.Search.Post.SearchResult();
            try
            {
                result = await Booru.GetRandomPostAsync(tag.Split(','));

                return(result);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);

                await SearchTag(context, tag);
            }

            return(result);
        }
예제 #2
0
        public SearchResult getRandomXbooru(string[] tags)
        {
            var booru = new BooruSharp.Booru.Xbooru();

            return(booru.GetRandomPostAsync(tags).Result);
        }