public async Task Execute(SocketUserMessage msg, SocketCommandContext context, IServiceProvider provider)
        {
            CatFact fact = await SimpleApiCall.Call <CatFact>("https://catfact.ninja/fact", provider);

            if (fact != null)
            {
                await context.Channel.SendMessageAsync(fact.fact);
            }
        }
Exemplo n.º 2
0
        public async Task Prog()
        {
            JObject fact = await SimpleApiCall.Call("https://programming-quotes-api.herokuapp.com/quotes/random", provider);

            if (fact != null)
            {
                await ReplyAsync("> " + fact["en"] + "\n" + fact["author"]);
            }
        }
Exemplo n.º 3
0
        public async Task DadJoke()
        {
            JObject fact = await SimpleApiCall.Call("https://icanhazdadjoke.com/", provider);

            if (fact != null)
            {
                await ReplyAsync(fact["joke"].ToString());
            }
        }
Exemplo n.º 4
0
        public async Task Geek()
        {
            string fact = await SimpleApiCall.Call <string>("https://geek-jokes.sameerkumar.website/api", provider);

            if (fact != null)
            {
                await ReplyAsync(fact);
            }
        }
Exemplo n.º 5
0
        public async Task Urgent()
        {
            JObject fact = await SimpleApiCall.Call("https://corporatebs-generator.sameerkumar.website/", provider);

            if (fact != null)
            {
                await ReplyAsync(fact["phrase"].ToString());
            }
        }
Exemplo n.º 6
0
        public async Task Chuck()
        {
            ChuckFact fact = await SimpleApiCall.Call <ChuckFact>("https://api.chucknorris.io/jokes/random", provider);

            if (fact != null)
            {
                await ReplyAsync(fact.value);
            }
        }
Exemplo n.º 7
0
        public async Task Dumb()
        {
            JObject fact = await SimpleApiCall.Call("https://api.tronalddump.io/random/quote", provider);

            if (fact != null)
            {
                await ReplyAsync(fact["value"].ToString());
            }
        }
Exemplo n.º 8
0
        public async Task DarkJoke()
        {
            JObject fact = await SimpleApiCall.Call(JokeUrl("Dark"), provider);

            if (fact != null)
            {
                await SendTwoPartJoke(fact);
            }
        }
Exemplo n.º 9
0
        public async Task MiscellaneousJoke()
        {
            JObject fact = await SimpleApiCall.Call(JokeUrl("Miscellaneous"), provider);

            if (fact != null)
            {
                await SendTwoPartJoke(fact);
            }
        }
Exemplo n.º 10
0
        public async Task ProgrammerJoke()
        {
            JObject fact = await SimpleApiCall.Call(JokeUrl("Programming"), provider);

            if (fact != null)
            {
                await SendTwoPartJoke(fact);
            }
        }
Exemplo n.º 11
0
        public async Task Gif(string term)
        {
            JObject fact = await SimpleApiCall.Call(GiphyUrl(term), provider);

            if (fact != null)
            {
                await ReplyAsync(fact["data"]["images"]["fixed_height"]["url"].ToString());
            }
        }
Exemplo n.º 12
0
        public async Task Advice()
        {
            JObject fact = await SimpleApiCall.Call("https://api.adviceslip.com/advice", provider);

            if (fact != null)
            {
                await ReplyAsync(fact["slip"]["advice"].ToString());
            }
        }