diff --git a/README.md b/README.md index dc572b6d..335d0ec5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ 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/), [Strawpoll](https://github.com/strawpoll/strawpoll/wiki/API), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Yandex.Translate](https://translate.yandex.com/developers), [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/), [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/), [Strawpoll](https://github.com/strawpoll/strawpoll/wiki/API), [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. diff --git a/commands/textedit/languages.json b/commands/textedit/languages.json deleted file mode 100644 index a9589e9b..00000000 --- a/commands/textedit/languages.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "languages": { - "af": "Afrikaans", - "am": "Amharic", - "ar": "Arabic", - "az": "Azerbaijani", - "ba": "Bashkir", - "be": "Belarusian", - "bg": "Bulgarian", - "bn": "Bengali", - "bs": "Bosnian", - "ca": "Catalan", - "ceb": "Cebuano", - "cs": "Czech", - "cy": "Welsh", - "da": "Danish", - "de": "German", - "el": "Greek", - "en": "English", - "eo": "Esperanto", - "es": "Spanish", - "et": "Estonian", - "eu": "Basque", - "fa": "Persian", - "fi": "Finnish", - "fr": "French", - "ga": "Irish", - "gd": "Scots Gaelic", - "gl": "Galician", - "gu": "Gujarati", - "he": "Hebrew", - "hi": "Hindi", - "hr": "Croatian", - "ht": "Haitian", - "hu": "Hungarian", - "hy": "Armenian", - "id": "Indonesian", - "is": "Icelandic", - "it": "Italian", - "ja": "Japanese", - "jv": "Javanese", - "ka": "Georgian", - "kk": "Kazakh", - "km": "Khmer", - "kn": "Kannada", - "ko": "Korean", - "ky": "Kyrgyz", - "la": "Latin", - "lb": "Luxembourgish", - "lo": "Loa", - "lt": "Lithuanian", - "lv": "Latvian", - "mg": "Malagasy", - "mhr": "Mari", - "mi": "Maori", - "mk": "Macedonian", - "ml": "Malayalam", - "mn": "Mongolian", - "mr": "Marathi", - "mrj": "Hill Mari", - "ms": "Malay", - "mt": "Maltese", - "my": "Burmese", - "ne": "Nepali", - "nl": "Dutch", - "no": "Norwegian", - "pa": "Punjabi", - "pap": "Papiamento", - "pl": "Polish", - "pt": "Portuguese", - "ro": "Romanian", - "ru": "Russian", - "si": "Sinhalese", - "sk": "Slovak", - "sl": "Slovenian", - "sq": "Albanian", - "sr": "Serbian", - "su": "Sundanese", - "sv": "Swedish", - "sw": "Swahili", - "ta": "Tamil", - "te": "Telugu", - "tg": "Tajik", - "th": "Thai", - "tl": "Tagalog", - "tr": "Turkish", - "tt": "Tatar", - "udm": "Udmurt", - "uk": "Ukrainian", - "ur": "Urdu", - "uz": "Uzbek", - "vi": "Vietnamese", - "xh": "Xhosa", - "yi": "Yiddish", - "zh": "Chinese" - } -} diff --git a/commands/textedit/translate.js b/commands/textedit/translate.js deleted file mode 100644 index 292bbff2..00000000 --- a/commands/textedit/translate.js +++ /dev/null @@ -1,66 +0,0 @@ -const { Command } = require('discord.js-commando'); -const { RichEmbed } = require('discord.js'); -const snekfetch = require('snekfetch'); -const { languages } = require('./languages.json'); - -module.exports = class TranslateCommand extends Command { - constructor(client) { - super(client, { - name: 'translate', - group: 'textedit', - memberName: 'translate', - description: 'Translates text to a given language. (;translate ja Give me the money!)', - details: '**Codes:** af: Afrikaans, am: Amharic, ar: Arabic, az: Azerbaijani, ba: Bashkir, be: Belarusian, bg: Bulgarian, bn: Bengali, bs: Bosnian, ca: Catalan, ceb: Cebuano, cs: Czech, cy: Welsh, da: Danish, de: German, el: Greek, en: English, eo: Esperanto, es: Spanish, et: Estonian, eu: Basque, fa: Persian, fi: Finnish, fr: French, ga: Irish, gd: Scots Gaelic, gl: Galician, gu: Gujarati, he: Hebrew, hi: Hindi, hr: Croatian, ht: Haitian, hu: Hungarian, hy: Armenian, id: Indonesian, is: Icelandic, it: Italian, ja: Japanese, jv: Javanese, ka: Georgian, kk: Kazakh, km: Khmer, kn: Kannada, ko: Korean, ky: Kyrgyz, la: Latin, lb: Luxembourgish, lo: Loa, lt: Lithuanian, lv: Latvian, mg: Malagasy, mhr: Mari, mi: Maori, mk: Macedonian, ml: Malayalam, mn: Mongolian, mr: Marathi, mrj: Hill Mari, ms: Malay, mt: Maltese, my: Burmese, ne: Nepali, nl: Dutch, no: Norwegian, pa: Punjabi, pap: Papiamento, pl: Polish, pt: Portuguese, ro: Romanian, ru: Russian, si: Sinhalese, sk: Slovak, sl: Slovenian, sq: Albanian, sr: Serbian, su: Sundanese, sv: Swedish, sw: Swahili, ta: Tamil, te: Telugu, tg: Tajik, th: Thai, tl: Tagalog, tr: Turkish, tt: Tatar, udm: Udmurt, uk: Ukrainian, ur: Urdu, uz: Uzbek, vi: Vietnamese, xh: Xhosa, yi: Yiddish, zh: Chinese', - examples: [';translate ja Give me the the money!'], - args: [{ - key: 'to', - prompt: 'What language would you like to translate to?', - type: 'string', - validate: to => { - if (languages[to.toLowerCase()]) { - return true; - } - return 'Please enter a valid language code. Use `;help translate` for a list of codes.'; - } - }, { - key: 'text', - prompt: 'What text would you like to translate?', - type: 'string', - validate: content => { - if (content.length > 200) { - return 'Please keep translation queries under 200 characters.'; - } - return true; - } - }] - }); - } - - async run(message, args) { - if (message.channel.type !== 'dm') { - if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return; - if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!'); - } - const language = args.to.toLowerCase(); - const query = encodeURIComponent(args.text); - try { - const response = await snekfetch - .get(`https://translate.yandex.net/api/v1.5/tr.json/translate?key=${process.env.YANDEX_KEY}&lang=${language}&text=${query}`); - const data = response.body; - const translated = data.text[0]; - const langs = data.lang.split('-'); - const langTo = langs[1]; - const langFrom = langs[0]; - const embed = new RichEmbed() - .setColor(0x00AE86) - .addField(`Input (From: ${languages[langFrom]}):`, - query) - .addField(`Translation (To: ${languages[langTo]}):`, - translated); - return message.embed(embed); - } - catch (err) { - return message.say(':x: Error! Something went wrong!'); - } - } -}; diff --git a/commands/util/info.js b/commands/util/info.js index f4faf0bc..e9cdc107 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', - '111', true) + '110', 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/), [Strawpoll](https://github.com/strawpoll/strawpoll/wiki/API), [Urban Dictionary](https://github.com/zdict/zdict/wiki/Urban-dictionary-API-documentation), [OMDB](http://www.omdbapi.com/), [Yahoo Weather](https://developer.yahoo.com/weather/), [Yandex.Translate](https://translate.yandex.com/developers), [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/), [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/), [Strawpoll](https://github.com/strawpoll/strawpoll/wiki/API), [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 197226cd..c3cd24a2 100644 --- a/html/carbondesc.html +++ b/html/carbondesc.html @@ -42,7 +42,6 @@