From 56af47e839039891defa33688fe81663289f851b Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 16 Apr 2017 15:55:30 +0000 Subject: [PATCH] Remove Yoda Command (API is too Slow) --- README.md | 4 ++-- commands/textedit/yoda.js | 38 -------------------------------------- commands/util/info.js | 4 ++-- html/carbondesc.html | 1 - html/carbonfeat.html | 2 +- html/discordbots.html | 3 +-- 6 files changed, 6 insertions(+), 46 deletions(-) delete mode 100644 commands/textedit/yoda.js diff --git a/README.md b/README.md index aff6cbda..e3958c9e 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,14 @@ You can join the home server with [this link](https://discord.gg/fqQF8mc). [discord.js](https://discord.js.org/#/), [commando](https://github.com/Gawdl3y/discord.js-commando), [zalgoize](https://github.com/clux/zalgolize), [snekfetch](https://github.com/GusCaplan/snekfetch), [mathjs](http://mathjs.org/), [moment](http://momentjs.com), [moment-duration-format](https://github.com/jsmreese/moment-duration-format), [jimp](https://github.com/oliver-moran/jimp), [cheerio](https://cheerio.js.org/) ## APIs -[Wattpad](https://developer.wattpad.com/docs/api), [Wordnik](http://developer.wordnik.com/docs.html), [osu!](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices](http://docs.yugiohprices.apiary.io/#), [YouTube Data](https://developers.google.com/youtube/v3/), [Yoda Speak](https://market.mashape.com/ismaelc/yoda-speak), [Discord Bots](https://bots.discord.pw/api), [Today in History](http://history.muffinlabs.com/#api), [jService](http://jservice.io/), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Google Static Maps](https://developers.google.com/maps/documentation/static-maps/) +[Wattpad](https://developer.wattpad.com/docs/api), [Wordnik](http://developer.wordnik.com/docs.html), [osu!](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices](http://docs.yugiohprices.apiary.io/#), [YouTube Data](https://developers.google.com/youtube/v3/), [Discord Bots](https://bots.discord.pw/api), [Today in History](http://history.muffinlabs.com/#api), [jService](http://jservice.io/), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Google Static Maps](https://developers.google.com/maps/documentation/static-maps/) ## Self-Hosting You can Self-Host the bot easily, provided you have API keys and a Discord Bot Token. [Node.js](https://nodejs.org/en/) is also required, with at least version 7.8.0 recommended. APIs that require API Keys: -[Wattpad](https://developer.wattpad.com/docs/api) | [Wordnik](http://developer.wordnik.com/docs.html) | [osu!](https://osu.ppy.sh/p/api) | [YouTube Data](https://developers.google.com/youtube/v3/) | [Yoda Speak](https://market.mashape.com/ismaelc/yoda-speak) +[Wattpad](https://developer.wattpad.com/docs/api) | [Wordnik](http://developer.wordnik.com/docs.html) | [osu!](https://osu.ppy.sh/p/api) | [YouTube Data](https://developers.google.com/youtube/v3/) > Note: If you do self-host, you will need to go into the file `index.js` and remove the entries for requests to Discord Bots and Carbon. diff --git a/commands/textedit/yoda.js b/commands/textedit/yoda.js deleted file mode 100644 index cc5e7bcf..00000000 --- a/commands/textedit/yoda.js +++ /dev/null @@ -1,38 +0,0 @@ -const { Command } = require('discord.js-commando'); -const snekfetch = require('snekfetch'); - -module.exports = class YodaCommand extends Command { - constructor(client) { - super(client, { - name: 'yoda', - group: 'textedit', - memberName: 'yoda', - description: 'Converts text to Yoda Speak. (;yoda This is Yoda.)', - examples: [';yoda This is Yoda.'], - args: [{ - key: 'text', - prompt: 'What text would you like to convert to Yoda speak?', - type: 'string' - }] - }); - } - - async run(message, args) { - if (message.channel.type !== 'dm') { - if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return; - } - const text = encodeURIComponent(args.text); - try { - const response = await snekfetch - .get(`https://yoda.p.mashape.com/yoda?sentence=${text}`) - .set({ - 'X-Mashape-Key': process.env.MASHAPE_KEY, - 'Accept': 'text/plain' - }); - return message.say(`\u180E${response.text}`); - } - catch (err) { - return message.say(':x: Error! Something went wrong!'); - } - } -}; diff --git a/commands/util/info.js b/commands/util/info.js index 01d5ce91..e42f3a4b 100644 --- a/commands/util/info.js +++ b/commands/util/info.js @@ -33,7 +33,7 @@ module.exports = class InfoCommand extends Command { .addField('Shards', `${this.client.options.shardCount} (${this.client.shard.id})`, true) .addField('Commands', - '109', true) + '108', true) .addField('Owner', 'dragonfire535#8081', true) .addField('Source Code', @@ -49,7 +49,7 @@ module.exports = class InfoCommand extends Command { .addField('Modules', '[commando](https://github.com/Gawdl3y/discord.js-commando), [zalgoize](https://github.com/clux/zalgolize), [snekfetch](https://github.com/GusCaplan/snekfetch), [mathjs](http://mathjs.org/), [moment](http://momentjs.com), [moment-duration-format](https://github.com/jsmreese/moment-duration-format), [jimp](https://github.com/oliver-moran/jimp), [cheerio](https://cheerio.js.org/)') .addField('APIs', - '[Wattpad](https://developer.wattpad.com/docs/api), [Wordnik](http://developer.wordnik.com/docs.html), [osu!](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices](http://docs.yugiohprices.apiary.io/#), [YouTube Data](https://developers.google.com/youtube/v3/), [Yoda Speak](https://market.mashape.com/ismaelc/yoda-speak), [Discord Bots](https://bots.discord.pw/api), [Today in History](http://history.muffinlabs.com/#api), [jService](http://jservice.io/), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Wikipedia](https://en.wikipedia.org/w/api.php), [Google Static Maps](https://developers.google.com/maps/documentation/static-maps/)'); + '[Wattpad](https://developer.wattpad.com/docs/api), [Wordnik](http://developer.wordnik.com/docs.html), [osu!](https://osu.ppy.sh/p/api), [memegen.link](https://memegen.link/), [Yugioh Prices](http://docs.yugiohprices.apiary.io/#), [YouTube Data](https://developers.google.com/youtube/v3/), [Discord Bots](https://bots.discord.pw/api), [Today in History](http://history.muffinlabs.com/#api), [jService](http://jservice.io/), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Wikipedia](https://en.wikipedia.org/w/api.php), [Google Static Maps](https://developers.google.com/maps/documentation/static-maps/)'); return message.embed(embed); } }; diff --git a/html/carbondesc.html b/html/carbondesc.html index 579e862b..bb814410 100644 --- a/html/carbondesc.html +++ b/html/carbondesc.html @@ -34,7 +34,6 @@
  • memegen.link
  • Yugioh Prices
  • YouTube Data
  • -
  • Yoda Speak
  • Discord Bots
  • Today in History
  • jService
  • diff --git a/html/carbonfeat.html b/html/carbonfeat.html index d3d10db4..9291165c 100644 --- a/html/carbonfeat.html +++ b/html/carbonfeat.html @@ -39,7 +39,7 @@
  • Get Weather and Forecasts for a Location
  • Search Wikipedia
  • Get Yu-Gi-Oh! Card Data
  • -
  • Pirate, Binary, and Yoda Translators
  • +
  • Pirate, Binary, and Temmie Translators
  • Reverse Text
  • Zalgoize Text
  • And so so so much more!
  • diff --git a/html/discordbots.html b/html/discordbots.html index b2a51941..304774e5 100644 --- a/html/discordbots.html +++ b/html/discordbots.html @@ -44,7 +44,7 @@
  • Get Weather and Forecasts for a Location
  • Search Wikipedia
  • Get Yu-Gi-Oh! Card Data
  • -
  • Pirate, Binary, and Yoda Translators
  • +
  • Pirate, Binary, and Temmie Translators
  • Reverse Text
  • Zalgoize Text
  • And so so so much more!
  • @@ -78,7 +78,6 @@
  • memegen.link
  • Yugioh Prices
  • YouTube Data
  • -
  • Yoda Speak
  • Discord Bots
  • Today in History
  • jService