Fix horoscope, new cat api (random.cat bork), move groups

This commit is contained in:
Daniel Odendahl Jr
2018-04-25 20:58:12 +00:00
parent 3dc48df4a9
commit 76860705da
7 changed files with 13 additions and 9 deletions
+2 -2
View File
@@ -158,7 +158,6 @@ served over 10,000 servers with a uniquely devoted fanbase.
* **rule-of-the-internet**: Responds with a rule of the internet.
* **rule34**: Responds with an image from Rule34, with optional query.
* **safebooru**: Responds with an image from Safebooru, with optional query.
* **spoopy-link**: Determines if a link is spoopy or not.
* **stack-overflow**: Searches Stack Overflow for your query.
* **steam**: Searches Steam for your query.
* **stocks**: Responds with the current stocks for a specific symbol.
@@ -176,7 +175,6 @@ served over 10,000 servers with a uniquely devoted fanbase.
* **xkcd**: Responds with an XKCD comic, either today's, a random one, or a specific one.
* **youtube**: Searches YouTube for your query.
* **yu-gi-oh**: Responds with info on a Yu-Gi-Oh! card.
* **zodiac-sign**: Responds with the Zodiac Sign for the given month/day.
### Analyzers:
@@ -187,7 +185,9 @@ served over 10,000 servers with a uniquely devoted fanbase.
* **read-qr-code**: Reads a QR Code.
* **severe-toxicity**: Determines the toxicity of text, but less sensitive to milder language.
* **ship**: Ships two users together.
* **spoopy-link**: Determines if a link is spoopy or not.
* **toxicity**: Determines the toxicity of text.
* **zodiac-sign**: Responds with the Zodiac Sign for the given month/day.
### Games:
-1
View File
@@ -9,7 +9,6 @@ module.exports = class DickCommand extends Command {
group: 'analyze',
memberName: 'dick',
description: 'Determines your dick size.',
nsfw: true,
args: [
{
key: 'user',
@@ -6,7 +6,7 @@ module.exports = class SpoopyLinkCommand extends Command {
constructor(client) {
super(client, {
name: 'spoopy-link',
group: 'search',
group: 'analyze',
memberName: 'spoopy-link',
description: 'Determines if a link is spoopy or not.',
args: [
@@ -4,7 +4,7 @@ module.exports = class ZodiacSignCommand extends Command {
constructor(client) {
super(client, {
name: 'zodiac-sign',
group: 'search',
group: 'analyze',
memberName: 'zodiac-sign',
description: 'Responds with the Zodiac Sign for the given month/day.',
args: [
+2 -1
View File
@@ -27,7 +27,8 @@ module.exports = class HoroscopeCommand extends Command {
async run(msg, { sign }) {
try {
const { body } = await snekfetch.get(`http://theastrologer-api.herokuapp.com/api/horoscope/${sign}/today`);
const { raw } = await snekfetch.get(`http://sandipbgt.com/theastrologer/api/horoscope/${sign}/today/`);
const body = JSON.parse(raw.toString());
const embed = new MessageEmbed()
.setColor(0x9797FF)
.setTitle(`Horoscope for ${body.sunsign}...`)
+6 -2
View File
@@ -1,5 +1,6 @@
const { Command } = require('discord.js-commando');
const snekfetch = require('snekfetch');
const { THE_CAT_API_KEY } = process.env;
module.exports = class CatCommand extends Command {
constructor(client) {
@@ -15,8 +16,11 @@ module.exports = class CatCommand extends Command {
async run(msg) {
try {
const { body } = await snekfetch.get('http://aws.random.cat/meow');
return msg.say({ files: [body.file] });
const { body, headers } = await snekfetch
.get('http://thecatapi.com/api/images/get')
.query({ api_key: THE_CAT_API_KEY });
const format = headers['content-type'].replace(/image\//i, '');
return msg.say({ files: [{ attachment: body, name: `cat.${format}` }] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "73.2.4",
"version": "73.2.5",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {