mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
Remove Tons of Dependencies
This commit is contained in:
@@ -13,7 +13,7 @@ You can add XiaoBot to your server with [this link](https://discordapp.com/oauth
|
|||||||
You can join the home server with [this link](https://discord.gg/fqQF8mc).
|
You can join the home server with [this link](https://discord.gg/fqQF8mc).
|
||||||
|
|
||||||
## Modules & APIs
|
## Modules & APIs
|
||||||
[discord.js](https://discord.js.org/#/), [commando](https://github.com/Gawdl3y/discord.js-commando), [pirate-speak](https://github.com/mikewesthad/pirate-speak), [zalgoize](https://github.com/clux/zalgolize), [hepburn](https://github.com/lovell/hepburn), [roman-numeral-converter-mmxvi](https://github.com/Cein-Markey/roman-numeral-conversion-library), [cowsay](https://github.com/piuccio/cowsay), [morse](https://github.com/ecto/morse), [superagent](https://github.com/visionmedia/superagent), [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/), [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)
|
[discord.js](https://discord.js.org/#/), [commando](https://github.com/Gawdl3y/discord.js-commando), [zalgoize](https://github.com/clux/zalgolize), [superagent](https://github.com/visionmedia/superagent), [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/), [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)
|
||||||
|
|
||||||
## Self-Hosting
|
## 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.
|
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.
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
|
||||||
const romanNumeralConverter = require('roman-numeral-converter-mmxvi');
|
|
||||||
|
|
||||||
module.exports = class RomanCommand extends Command {
|
|
||||||
constructor(client) {
|
|
||||||
super(client, {
|
|
||||||
name: 'roman',
|
|
||||||
group: 'numedit',
|
|
||||||
memberName: 'roman',
|
|
||||||
description: 'Converts numbers to Roman Numerals. (;roman 2)',
|
|
||||||
examples: [';roman 2'],
|
|
||||||
args: [{
|
|
||||||
key: 'number',
|
|
||||||
prompt: 'What do you want to convert to Roman?',
|
|
||||||
type: 'integer',
|
|
||||||
validate: number => {
|
|
||||||
if (number < 1000001 && number > 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return 'Please enter a number below one million and above zero.';
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
run(message, args) {
|
|
||||||
if (message.channel.type !== 'dm') {
|
|
||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
|
||||||
}
|
|
||||||
const number = args.number;
|
|
||||||
const roman = romanNumeralConverter.getRomanFromInteger(number);
|
|
||||||
return message.say(roman);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const cowsay = require('cowsay');
|
|
||||||
|
|
||||||
module.exports = class CowsayCommand extends Command {
|
module.exports = class CowsayCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -12,7 +11,13 @@ module.exports = class CowsayCommand extends Command {
|
|||||||
args: [{
|
args: [{
|
||||||
key: 'text',
|
key: 'text',
|
||||||
prompt: 'What text would you like the cow to say?',
|
prompt: 'What text would you like the cow to say?',
|
||||||
type: 'string'
|
type: 'string',
|
||||||
|
validate: text => {
|
||||||
|
if (text.length < 1500) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return 'Your message content is too long.';
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -22,10 +27,6 @@ module.exports = class CowsayCommand extends Command {
|
|||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||||
}
|
}
|
||||||
const text = args.text;
|
const text = args.text;
|
||||||
return message.code(null, cowsay.say({
|
return message.code(null, `< ${text} >\n \\ ^__^\n \\ (oO)\\_______\n (__)\\ )\\/\\\n U ||----w |\n || ||`);
|
||||||
text: text,
|
|
||||||
e: 'oO',
|
|
||||||
T: 'U '
|
|
||||||
})).catch(() => message.say(':x: Error! Perhaps the content is too long?'));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,43 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const morse = require('morse');
|
const translator = require('../../functions/translator.js');
|
||||||
|
const morse = {
|
||||||
|
"a": ".-",
|
||||||
|
"b": "-...",
|
||||||
|
"c": "-.-.",
|
||||||
|
"d": "-..",
|
||||||
|
"e": ".",
|
||||||
|
"f": "..-.",
|
||||||
|
"g": "--.",
|
||||||
|
"h": "....",
|
||||||
|
"i": "..",
|
||||||
|
"j": ".---",
|
||||||
|
"k": "-.-",
|
||||||
|
"l": ".-..",
|
||||||
|
"m": "--",
|
||||||
|
"n": "-.",
|
||||||
|
"o": "---",
|
||||||
|
"p": ".--.",
|
||||||
|
"q": "--.-",
|
||||||
|
"r": ".-.",
|
||||||
|
"s": "...",
|
||||||
|
"t": "-",
|
||||||
|
"u": "..-",
|
||||||
|
"v": "...-",
|
||||||
|
"w": ".--",
|
||||||
|
"x": "-..-",
|
||||||
|
"y": "-.--",
|
||||||
|
"z": "--..",
|
||||||
|
"0": "-----",
|
||||||
|
"1": ".----",
|
||||||
|
"2": "..---",
|
||||||
|
"3": "...--",
|
||||||
|
"4": "....-",
|
||||||
|
"5": ".....",
|
||||||
|
"6": "-....",
|
||||||
|
"7": "--...",
|
||||||
|
"8": "---..",
|
||||||
|
"9": "----."
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = class MorseCommand extends Command {
|
module.exports = class MorseCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -17,7 +55,7 @@ module.exports = class MorseCommand extends Command {
|
|||||||
prompt: 'What text would you like to convert to morse?',
|
prompt: 'What text would you like to convert to morse?',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
validate: content => {
|
validate: content => {
|
||||||
if (morse.encode(content).length < 1900) {
|
if (translator.letterTrans(content, morse).length < 1900) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return 'Your text to encode is too long.';
|
return 'Your text to encode is too long.';
|
||||||
@@ -31,7 +69,7 @@ module.exports = class MorseCommand extends Command {
|
|||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||||
}
|
}
|
||||||
const text = args.text;
|
const text = args.text;
|
||||||
const encoded = morse.encode(text);
|
const encoded = translator.letterTrans(text, morse);
|
||||||
return message.say(encoded);
|
return message.say(encoded);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const pirateSpeak = require('pirate-speak');
|
const translator = require('../../functions/translator.js');
|
||||||
|
const { dictionary } = require('./pirateDictionary.json');
|
||||||
|
|
||||||
module.exports = class PirateCommand extends Command {
|
module.exports = class PirateCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -18,7 +19,7 @@ module.exports = class PirateCommand extends Command {
|
|||||||
prompt: 'What text would you like to convert to pirate?',
|
prompt: 'What text would you like to convert to pirate?',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
validate: content => {
|
validate: content => {
|
||||||
if (pirateSpeak.translate(content).length > 1950) {
|
if (translator.wordTrans(content, dictionary).length > 1950) {
|
||||||
return 'Your message content is too long.';
|
return 'Your message content is too long.';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -32,7 +33,7 @@ module.exports = class PirateCommand extends Command {
|
|||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||||
}
|
}
|
||||||
const text = args.text;
|
const text = args.text;
|
||||||
const pirate = pirateSpeak.translate(text);
|
const pirate = translator.wordTrans(text, dictionary);
|
||||||
return message.say(`\u180E${pirate}`);
|
return message.say(`\u180E${pirate}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,156 @@
|
|||||||
|
{
|
||||||
|
"dictionary": {
|
||||||
|
"address": "port o' call",
|
||||||
|
"admin": "helm",
|
||||||
|
"am": "be",
|
||||||
|
"an": "a",
|
||||||
|
"and": "n'",
|
||||||
|
"are": "be",
|
||||||
|
"award": "prize",
|
||||||
|
"bathroom": "head",
|
||||||
|
"beer": "grog",
|
||||||
|
"before": "afore",
|
||||||
|
"belief": "creed",
|
||||||
|
"between": "betwixt",
|
||||||
|
"big": "vast",
|
||||||
|
"bill": "coin",
|
||||||
|
"bills": "coins",
|
||||||
|
"boss": "admiral",
|
||||||
|
"bourbon": "rum",
|
||||||
|
"box": "barrel",
|
||||||
|
"boy": "lad",
|
||||||
|
"buddy": "mate",
|
||||||
|
"business": "company",
|
||||||
|
"businesses": "companies",
|
||||||
|
"calling": "callin'",
|
||||||
|
"canada": "Great North",
|
||||||
|
"cash": "coin",
|
||||||
|
"cat": "parrot",
|
||||||
|
"cheat": "hornswaggle",
|
||||||
|
"comes": "hails",
|
||||||
|
"comments": "yer words",
|
||||||
|
"cool": "shipshape",
|
||||||
|
"country": "land",
|
||||||
|
"dashboard": "shanty",
|
||||||
|
"dead": "in Davy Jones's Locker",
|
||||||
|
"disconnect": "keelhaul",
|
||||||
|
"do": "d'",
|
||||||
|
"dog": "parrot",
|
||||||
|
"dollar": "doubloon",
|
||||||
|
"dollars": "doubloons",
|
||||||
|
"dude": "pirate",
|
||||||
|
"employee": "crew",
|
||||||
|
"everyone": "all hands",
|
||||||
|
"eye": "eye-patch",
|
||||||
|
"family": "kin",
|
||||||
|
"fee": "debt",
|
||||||
|
"female": "wench",
|
||||||
|
"females": "wenches",
|
||||||
|
"food": "grub",
|
||||||
|
"for": "fer",
|
||||||
|
"friend": "mate",
|
||||||
|
"friends": "crew",
|
||||||
|
"fuck": "shiver me timbers",
|
||||||
|
"gin": "rum",
|
||||||
|
"girl": "lass",
|
||||||
|
"girls": "lassies",
|
||||||
|
"go": "sail",
|
||||||
|
"good": "jolly good",
|
||||||
|
"grave": "Davy Jones's Locker",
|
||||||
|
"group": "maties",
|
||||||
|
"gun": "bluderbuss",
|
||||||
|
"haha": "yo ho",
|
||||||
|
"hahaha": "yo ho ho",
|
||||||
|
"hahahaha": "yo ho ho ho",
|
||||||
|
"hand": "hook",
|
||||||
|
"happy": "grog-filled",
|
||||||
|
"hello": "ahoy",
|
||||||
|
"hey": "ahoy",
|
||||||
|
"hi": "ahoy",
|
||||||
|
"hotel": "fleebag inn",
|
||||||
|
"i": "me",
|
||||||
|
"i'm": "i be",
|
||||||
|
"internet": "series o' tubes",
|
||||||
|
"invalid": "sunk",
|
||||||
|
"is": "be",
|
||||||
|
"island": "isle",
|
||||||
|
"isn't": "be not",
|
||||||
|
"it's": "'tis",
|
||||||
|
"jail": "brig",
|
||||||
|
"kill": "keelhaul",
|
||||||
|
"king": "king",
|
||||||
|
"ladies": "lasses",
|
||||||
|
"lady": "lass",
|
||||||
|
"lawyer": "scurvy land lubber",
|
||||||
|
"left": "port",
|
||||||
|
"leg": "peg",
|
||||||
|
"logout": "walk the plank",
|
||||||
|
"lol": "blimey",
|
||||||
|
"male": "pirate",
|
||||||
|
"man": "pirate",
|
||||||
|
"manager": "admiral",
|
||||||
|
"money": "doubloons",
|
||||||
|
"month": "moon",
|
||||||
|
"my": "me",
|
||||||
|
"never": "nary",
|
||||||
|
"no": "nay",
|
||||||
|
"not": "nay",
|
||||||
|
"of": "o'",
|
||||||
|
"old": "barnacle-covered",
|
||||||
|
"omg": "shiver me timbers",
|
||||||
|
"over": "o'er",
|
||||||
|
"page": "parchment",
|
||||||
|
"people": "scallywags",
|
||||||
|
"person": "scurvy dog",
|
||||||
|
"posted": "tacked to the yardarm",
|
||||||
|
"president": "king",
|
||||||
|
"prison": "brig",
|
||||||
|
"quickly": "smartly",
|
||||||
|
"really": "verily",
|
||||||
|
"relative": "kin",
|
||||||
|
"relatives": "kin",
|
||||||
|
"religion": "creed",
|
||||||
|
"restaurant": "galley",
|
||||||
|
"right": "starboard",
|
||||||
|
"rotf": "rollin' on the decks",
|
||||||
|
"say": "cry",
|
||||||
|
"seconds": "ticks o' tha clock",
|
||||||
|
"shipping": "cargo",
|
||||||
|
"shit": "shiver me timbers",
|
||||||
|
"small": "puny",
|
||||||
|
"snack": "grub",
|
||||||
|
"soldier": "sailor",
|
||||||
|
"sorry": "yarr",
|
||||||
|
"spouse": "ball 'n' chain",
|
||||||
|
"state": "land",
|
||||||
|
"supervisor": "Cap'n",
|
||||||
|
"that's": "that be",
|
||||||
|
"the": "thar",
|
||||||
|
"theif": "swoggler",
|
||||||
|
"them": "'em",
|
||||||
|
"this": "dis",
|
||||||
|
"to": "t'",
|
||||||
|
"together": "t'gether",
|
||||||
|
"treasure": "booty",
|
||||||
|
"vodka": "rum",
|
||||||
|
"was": "be",
|
||||||
|
"water": "grog",
|
||||||
|
"we": "our jolly crew",
|
||||||
|
"we're": "we's",
|
||||||
|
"whiskey": "rum",
|
||||||
|
"whisky": "rum",
|
||||||
|
"wine": "grog",
|
||||||
|
"with": "wit'",
|
||||||
|
"woman": "comely wench",
|
||||||
|
"women": "beauties",
|
||||||
|
"work": "duty",
|
||||||
|
"yah": "aye",
|
||||||
|
"yeah": "aye",
|
||||||
|
"yes": "aye",
|
||||||
|
"you": "ye",
|
||||||
|
"you're": "you be",
|
||||||
|
"you've": "ye",
|
||||||
|
"your": "yer",
|
||||||
|
"yup": "aye"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
|
||||||
const hepburn = require('hepburn');
|
|
||||||
|
|
||||||
module.exports = class RomajiCommand extends Command {
|
|
||||||
constructor(client) {
|
|
||||||
super(client, {
|
|
||||||
name: 'romaji',
|
|
||||||
aliases: [
|
|
||||||
'romajify'
|
|
||||||
],
|
|
||||||
group: 'textedit',
|
|
||||||
memberName: 'romaji',
|
|
||||||
description: 'Convert Hiragana and Katakana to Romaji (;romaji ひらがな)',
|
|
||||||
examples: [';romaji ひらがな'],
|
|
||||||
args: [{
|
|
||||||
key: 'kana',
|
|
||||||
prompt: 'What kana would you like to convert to romaji?',
|
|
||||||
type: 'string',
|
|
||||||
validate: kana => {
|
|
||||||
if (hepburn.containsKana(kana)) {
|
|
||||||
if (hepburn.fromKana(kana).length > 1950) {
|
|
||||||
return 'Your message content is too long.';
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return 'Please enter text in either Hiragana or Katakana.';
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
run(message, args) {
|
|
||||||
if (message.channel.type !== 'dm') {
|
|
||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
|
||||||
}
|
|
||||||
const kana = args.kana;
|
|
||||||
const romaji = hepburn.fromKana(kana);
|
|
||||||
return message.say(romaji);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
|
||||||
String.prototype.shuffle = function() {
|
|
||||||
let a = this.split(''),
|
|
||||||
n = a.length;
|
|
||||||
for (let i = n - 1; i > 0; i--) {
|
|
||||||
let j = Math.floor(Math.random() * (i + 1));
|
|
||||||
let tmp = a[i];
|
|
||||||
a[i] = a[j];
|
|
||||||
a[j] = tmp;
|
|
||||||
}
|
|
||||||
return a.join('');
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = class ShuffleCommand extends Command {
|
|
||||||
constructor(client) {
|
|
||||||
super(client, {
|
|
||||||
name: 'shuffle',
|
|
||||||
group: 'textedit',
|
|
||||||
memberName: 'shuffle',
|
|
||||||
description: 'Shuffles text (;shuffle This Text)',
|
|
||||||
examples: [';shuffle This Text'],
|
|
||||||
args: [{
|
|
||||||
key: 'text',
|
|
||||||
prompt: 'What text would you like to shuffle?',
|
|
||||||
type: 'string'
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
run(message, args) {
|
|
||||||
if (message.channel.type !== 'dm') {
|
|
||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
|
||||||
}
|
|
||||||
const text = args.text;
|
|
||||||
const shuffled = text.shuffle();
|
|
||||||
return message.say(`\u180E${shuffled}`);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const temmize = require('./temmize.js');
|
const translator = require('../../functions/translator.js');
|
||||||
|
const { dictionary } = require('./temmieDictionary.json');
|
||||||
|
|
||||||
module.exports = class TemmieCommand extends Command {
|
module.exports = class TemmieCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -14,7 +15,7 @@ module.exports = class TemmieCommand extends Command {
|
|||||||
prompt: 'What text would you like to convert to Temmie speak?',
|
prompt: 'What text would you like to convert to Temmie speak?',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
validate: content => {
|
validate: content => {
|
||||||
if (temmize(content).length > 1950) {
|
if (translator.wordTrans(content, dictionary).length > 1950) {
|
||||||
return 'Your message content is too long.';
|
return 'Your message content is too long.';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -28,7 +29,7 @@ module.exports = class TemmieCommand extends Command {
|
|||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||||
}
|
}
|
||||||
const text = args.text;
|
const text = args.text;
|
||||||
const temmized = temmize(text);
|
const temmized = translator.wordTrans(text, dictionary);
|
||||||
return message.say(`\u180E${temmized}`);
|
return message.say(`\u180E${temmized}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,234 @@
|
|||||||
|
{
|
||||||
|
"dictionary": {
|
||||||
|
"i": "tem",
|
||||||
|
"hi": "hoi",
|
||||||
|
"that": "dat",
|
||||||
|
"that's": "dat",
|
||||||
|
"hello": "hoi",
|
||||||
|
"me": "temmie",
|
||||||
|
"goodbye": "boi",
|
||||||
|
"bye": "boi",
|
||||||
|
"later": "boi",
|
||||||
|
"college": "colleg",
|
||||||
|
"money": "muns",
|
||||||
|
"food": "tem flakes",
|
||||||
|
"snack": "tem flakes",
|
||||||
|
"snacks": "tem flakes",
|
||||||
|
"meal": "tem flakes",
|
||||||
|
"meals": "tem flakes",
|
||||||
|
"human": "hooman",
|
||||||
|
"humans": "hoomans",
|
||||||
|
"chocolate": "choco",
|
||||||
|
"cute": "coot",
|
||||||
|
"allergic": "allergics",
|
||||||
|
"allergy": "allergics",
|
||||||
|
"do": "dos",
|
||||||
|
"does": "dos",
|
||||||
|
"what": "ppppppppp...",
|
||||||
|
"who": "ppppppppp...",
|
||||||
|
"when": "ppppppppp...",
|
||||||
|
"why": "ppppppppp...",
|
||||||
|
"where": "ppppppppp...",
|
||||||
|
"how": "ppppppppp...",
|
||||||
|
"xd": "xd",
|
||||||
|
"but": "b-but",
|
||||||
|
"store": "tem shop",
|
||||||
|
"restaurant": "tem shop",
|
||||||
|
"shop": "tem shop",
|
||||||
|
"temmie": "temmiy",
|
||||||
|
"sick": "holves",
|
||||||
|
"illness": "holves",
|
||||||
|
"ill": "holves",
|
||||||
|
"disease": "holves",
|
||||||
|
"cat": "tem",
|
||||||
|
"dog": 'tem',
|
||||||
|
"hugs": "pets",
|
||||||
|
"pats": "pets",
|
||||||
|
"waves": "pets",
|
||||||
|
"high-fives": "pets",
|
||||||
|
"fistbumps": "pets",
|
||||||
|
"hug": "pet",
|
||||||
|
"pat": "pet",
|
||||||
|
"wave": "pet",
|
||||||
|
"high-five": "pet",
|
||||||
|
"fistbump": "pet",
|
||||||
|
"hungry": "hungr",
|
||||||
|
"muscles": "not coot",
|
||||||
|
"aw": "awwawa",
|
||||||
|
"yikes": "omg!",
|
||||||
|
"ah": "omg!",
|
||||||
|
"oh": "omg!",
|
||||||
|
"yipe": "omg!",
|
||||||
|
"wait": "omg!",
|
||||||
|
"yes": "yee!",
|
||||||
|
"no": "no!",
|
||||||
|
"person": "bark",
|
||||||
|
"monster": "munster",
|
||||||
|
"monsters": "munsters",
|
||||||
|
"great": "tem outta tem",
|
||||||
|
"awesome": "tem outta tem",
|
||||||
|
"cool": "tem outta tem",
|
||||||
|
"nice": "tem outta tem",
|
||||||
|
"good": "tem outta tem",
|
||||||
|
"walks": "vibrates",
|
||||||
|
"moves": "vibrates",
|
||||||
|
"sits": "vibrates",
|
||||||
|
"goes": "vibrates",
|
||||||
|
"runs": "vibrates intensely",
|
||||||
|
"climbs": "vibrates intensely",
|
||||||
|
"escapes": "vibrates intensely",
|
||||||
|
"normal": "bob",
|
||||||
|
"hmm": "p...",
|
||||||
|
"okay": "ok",
|
||||||
|
"lol": "lel",
|
||||||
|
"enemy": "special enemy",
|
||||||
|
"villain": "special enemy",
|
||||||
|
"bad guy": "special enemy",
|
||||||
|
"badguy": "special enemy",
|
||||||
|
"school": "skool",
|
||||||
|
"um": "p...",
|
||||||
|
"elizabeth": "ebears",
|
||||||
|
"yeah": "yaya",
|
||||||
|
"yea": "yaya",
|
||||||
|
"uh-huh": "yaya",
|
||||||
|
"vampire": "wampire",
|
||||||
|
"tired": "*dies*",
|
||||||
|
"exhausted": "*dies*",
|
||||||
|
"bored": "*dies*",
|
||||||
|
"annoyed": "*dies*",
|
||||||
|
"irritated": "*dies*",
|
||||||
|
"mad": "*dies*",
|
||||||
|
"sleepy": "*dies*",
|
||||||
|
"confused": "*dies*",
|
||||||
|
"house": "tem villag",
|
||||||
|
"home": "tem villag",
|
||||||
|
"apartment": "tem villag",
|
||||||
|
"world": "undergroun",
|
||||||
|
"hotel": "mtt resort",
|
||||||
|
"motel": "mtt resort",
|
||||||
|
"inn": "mtt resort",
|
||||||
|
"cash": "g",
|
||||||
|
"gold": "g",
|
||||||
|
"jewels": "g",
|
||||||
|
"aaron": "not coot",
|
||||||
|
"boy": "tim",
|
||||||
|
"girl": "tem",
|
||||||
|
"we": "tems",
|
||||||
|
"you": "u",
|
||||||
|
"your": "ur",
|
||||||
|
"yours": "urs",
|
||||||
|
"there": "dere",
|
||||||
|
"proud": "prouds",
|
||||||
|
"random": "rando",
|
||||||
|
"see": "c",
|
||||||
|
"this": "dis",
|
||||||
|
"egg": "eg",
|
||||||
|
"very": "very!",
|
||||||
|
"excited": "excite",
|
||||||
|
"doesn't": "don't",
|
||||||
|
"sleep": "slep",
|
||||||
|
"noodles": "alphys foob",
|
||||||
|
"scream": "screems",
|
||||||
|
"gonna": "gunna",
|
||||||
|
"pasta": "papy foob",
|
||||||
|
"spaghetti": "papy foob",
|
||||||
|
"scary": "scaredy",
|
||||||
|
"frightening": "scaredy",
|
||||||
|
"worry": "worrys",
|
||||||
|
"worries": "worrys",
|
||||||
|
"sushi": "undyne foob",
|
||||||
|
"banana": "bernerner",
|
||||||
|
"bananas": "bernerners",
|
||||||
|
"apple": "oppl",
|
||||||
|
"apples": "oppls",
|
||||||
|
"grape": "grep",
|
||||||
|
"grapes": "greps",
|
||||||
|
"wonder": "wunders",
|
||||||
|
"wonders": "wunders",
|
||||||
|
"wondering": "wunders",
|
||||||
|
"wonderful": "wunderfull",
|
||||||
|
"think": "finks",
|
||||||
|
"thinks": "finks",
|
||||||
|
"thought": "finked",
|
||||||
|
"beat": "dunks",
|
||||||
|
"defeat": "dunks",
|
||||||
|
"defeated": "dunkd",
|
||||||
|
"they're": "their",
|
||||||
|
"their": "there",
|
||||||
|
"you're": "ur",
|
||||||
|
"because": "cuz",
|
||||||
|
"bc": "cuz",
|
||||||
|
"will": "wil",
|
||||||
|
"things": "thins",
|
||||||
|
"thing": "thin",
|
||||||
|
"science": "scienc",
|
||||||
|
"ice cream": "noice creem",
|
||||||
|
"spear": "speer",
|
||||||
|
"baby": "temini",
|
||||||
|
"babies": "teminis",
|
||||||
|
"child": "temini",
|
||||||
|
"children": "teminis",
|
||||||
|
"kid": "temini",
|
||||||
|
"kids": "teminis",
|
||||||
|
"bot": "xiao",
|
||||||
|
"robot": "mettatun",
|
||||||
|
"ghost": "bluuk",
|
||||||
|
"nap": "slep",
|
||||||
|
"boop": "blep",
|
||||||
|
"beep": "blep",
|
||||||
|
"bleep": "blep",
|
||||||
|
"bop": "blep",
|
||||||
|
"spider": "spoider",
|
||||||
|
"spiders": "sploiders",
|
||||||
|
"music": "moosics",
|
||||||
|
"again": "agin",
|
||||||
|
"the": "teh",
|
||||||
|
"family": "fam",
|
||||||
|
"smart": "smarts",
|
||||||
|
"smartness": "smartiness",
|
||||||
|
"intelligence": "smartiness",
|
||||||
|
"typo": "tpyo",
|
||||||
|
"typo'd": "tyop'd",
|
||||||
|
"typos": "typoys",
|
||||||
|
"yay": "yee",
|
||||||
|
"potato": "tato",
|
||||||
|
"potatoes": "tatos",
|
||||||
|
"fry": "fri",
|
||||||
|
"fries": "fri",
|
||||||
|
"burger": "glamburg",
|
||||||
|
"steak": "stek",
|
||||||
|
"heart": "hart",
|
||||||
|
"love": "lub",
|
||||||
|
"hate": "h8",
|
||||||
|
"like": "liek",
|
||||||
|
"library": "librarby",
|
||||||
|
"fire": "flemz",
|
||||||
|
"flame": "flemz",
|
||||||
|
"fires": "flemz",
|
||||||
|
"flames": "flemz",
|
||||||
|
"witchcraft": "magics",
|
||||||
|
"witchcrafts": "magics",
|
||||||
|
"magic": "magics",
|
||||||
|
"sorcery": "magics",
|
||||||
|
"superpower": "magics",
|
||||||
|
"superpowers": "magics",
|
||||||
|
"sorceries": "magics",
|
||||||
|
"and": "n",
|
||||||
|
"my": "tem's",
|
||||||
|
"mine": "tem's",
|
||||||
|
"everyone": "everytem",
|
||||||
|
"anyone": "anytem",
|
||||||
|
"someone": "sometem",
|
||||||
|
"everbody": "everytemmie",
|
||||||
|
"anybody": "anytemmie",
|
||||||
|
"somebody": "sometemmie",
|
||||||
|
"beautiful": "booftifull",
|
||||||
|
"pretty": "prety",
|
||||||
|
"so": "soooo",
|
||||||
|
"help": "halp",
|
||||||
|
"uh-uh": "nuh",
|
||||||
|
"nope": "nuh",
|
||||||
|
"nuh-uh": "nuh",
|
||||||
|
"please": "pls"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,287 +0,0 @@
|
|||||||
const dictionary = {
|
|
||||||
"i": "tem",
|
|
||||||
"hi": "hoi",
|
|
||||||
"that": "dat",
|
|
||||||
"that's": "dat",
|
|
||||||
"hello": "hoi",
|
|
||||||
"me": "temmie",
|
|
||||||
"goodbye": "boi",
|
|
||||||
"bye": "boi",
|
|
||||||
"later": "boi",
|
|
||||||
"college": "colleg",
|
|
||||||
"money": "muns",
|
|
||||||
"food": "tem flakes",
|
|
||||||
"snack": "tem flakes",
|
|
||||||
"snacks": "tem flakes",
|
|
||||||
"meal": "tem flakes",
|
|
||||||
"meals": "tem flakes",
|
|
||||||
"human": "hooman",
|
|
||||||
"humans": "hoomans",
|
|
||||||
"chocolate": "choco",
|
|
||||||
"cute": "coot",
|
|
||||||
"allergic": "allergics",
|
|
||||||
"allergy": "allergics",
|
|
||||||
"do": "dos",
|
|
||||||
"does": "dos",
|
|
||||||
"what": "ppppppppp...",
|
|
||||||
"who": "ppppppppp...",
|
|
||||||
"when": "ppppppppp...",
|
|
||||||
"why": "ppppppppp...",
|
|
||||||
"where": "ppppppppp...",
|
|
||||||
"how": "ppppppppp...",
|
|
||||||
"xd": "xd",
|
|
||||||
"but": "b-but",
|
|
||||||
"store": "tem shop",
|
|
||||||
"restaurant": "tem shop",
|
|
||||||
"shop": "tem shop",
|
|
||||||
"temmie": "temmiy",
|
|
||||||
"sick": "holves",
|
|
||||||
"illness": "holves",
|
|
||||||
"ill": "holves",
|
|
||||||
"disease": "holves",
|
|
||||||
"cat": "tem",
|
|
||||||
"dog": 'tem',
|
|
||||||
"hugs": "pets",
|
|
||||||
"pats": "pets",
|
|
||||||
"waves": "pets",
|
|
||||||
"high-fives": "pets",
|
|
||||||
"fistbumps": "pets",
|
|
||||||
"hug": "pet",
|
|
||||||
"pat": "pet",
|
|
||||||
"wave": "pet",
|
|
||||||
"high-five": "pet",
|
|
||||||
"fistbump": "pet",
|
|
||||||
"hungry": "hungr",
|
|
||||||
"muscles": "not coot",
|
|
||||||
"aw": "awwawa",
|
|
||||||
"yikes": "omg!",
|
|
||||||
"ah": "omg!",
|
|
||||||
"oh": "omg!",
|
|
||||||
"yipe": "omg!",
|
|
||||||
"wait": "omg!",
|
|
||||||
"yes": "yee!",
|
|
||||||
"no": "no!",
|
|
||||||
"person": "bark",
|
|
||||||
"monster": "munster",
|
|
||||||
"monsters": "munsters",
|
|
||||||
"great": "tem outta tem",
|
|
||||||
"awesome": "tem outta tem",
|
|
||||||
"cool": "tem outta tem",
|
|
||||||
"nice": "tem outta tem",
|
|
||||||
"good": "tem outta tem",
|
|
||||||
"walks": "vibrates",
|
|
||||||
"moves": "vibrates",
|
|
||||||
"sits": "vibrates",
|
|
||||||
"goes": "vibrates",
|
|
||||||
"runs": "vibrates intensely",
|
|
||||||
"climbs": "vibrates intensely",
|
|
||||||
"escapes": "vibrates intensely",
|
|
||||||
"normal": "bob",
|
|
||||||
"hmm": "p...",
|
|
||||||
"okay": "ok",
|
|
||||||
"lol": "lel",
|
|
||||||
"enemy": "special enemy",
|
|
||||||
"villain": "special enemy",
|
|
||||||
"bad guy": "special enemy",
|
|
||||||
"badguy": "special enemy",
|
|
||||||
"school": "skool",
|
|
||||||
"um": "p...",
|
|
||||||
"elizabeth": "ebears",
|
|
||||||
"yeah": "yaya",
|
|
||||||
"yea": "yaya",
|
|
||||||
"uh-huh": "yaya",
|
|
||||||
"vampire": "wampire",
|
|
||||||
"tired": "*dies*",
|
|
||||||
"exhausted": "*dies*",
|
|
||||||
"bored": "*dies*",
|
|
||||||
"annoyed": "*dies*",
|
|
||||||
"irritated": "*dies*",
|
|
||||||
"mad": "*dies*",
|
|
||||||
"sleepy": "*dies*",
|
|
||||||
"confused": "*dies*",
|
|
||||||
"house": "tem villag",
|
|
||||||
"home": "tem villag",
|
|
||||||
"apartment": "tem villag",
|
|
||||||
"world": "undergroun",
|
|
||||||
"hotel": "mtt resort",
|
|
||||||
"motel": "mtt resort",
|
|
||||||
"inn": "mtt resort",
|
|
||||||
"cash": "g",
|
|
||||||
"gold": "g",
|
|
||||||
"jewels": "g",
|
|
||||||
"aaron": "not coot",
|
|
||||||
"boy": "tim",
|
|
||||||
"girl": "tem",
|
|
||||||
"we": "tems",
|
|
||||||
"you": "u",
|
|
||||||
"your": "ur",
|
|
||||||
"yours": "urs",
|
|
||||||
"there": "dere",
|
|
||||||
"proud": "prouds",
|
|
||||||
"random": "rando",
|
|
||||||
"see": "c",
|
|
||||||
"this": "dis",
|
|
||||||
"egg": "eg",
|
|
||||||
"very": "very!",
|
|
||||||
"excited": "excite",
|
|
||||||
"doesn't": "don't",
|
|
||||||
"sleep": "slep",
|
|
||||||
"noodles": "alphys foob",
|
|
||||||
"scream": "screems",
|
|
||||||
"gonna": "gunna",
|
|
||||||
"pasta": "papy foob",
|
|
||||||
"spaghetti": "papy foob",
|
|
||||||
"scary": "scaredy",
|
|
||||||
"frightening": "scaredy",
|
|
||||||
"worry": "worrys",
|
|
||||||
"worries": "worrys",
|
|
||||||
"sushi": "undyne foob",
|
|
||||||
"banana": "bernerner",
|
|
||||||
"bananas": "bernerners",
|
|
||||||
"apple": "oppl",
|
|
||||||
"apples": "oppls",
|
|
||||||
"grape": "grep",
|
|
||||||
"grapes": "greps",
|
|
||||||
"wonder": "wunders",
|
|
||||||
"wonders": "wunders",
|
|
||||||
"wondering": "wunders",
|
|
||||||
"wonderful": "wunderfull",
|
|
||||||
"think": "finks",
|
|
||||||
"thinks": "finks",
|
|
||||||
"thought": "finked",
|
|
||||||
"beat": "dunks",
|
|
||||||
"defeat": "dunks",
|
|
||||||
"defeated": "dunkd",
|
|
||||||
"they're": "their",
|
|
||||||
"their": "there",
|
|
||||||
"you're": "ur",
|
|
||||||
"because": "cuz",
|
|
||||||
"bc": "cuz",
|
|
||||||
"will": "wil",
|
|
||||||
"things": "thins",
|
|
||||||
"thing": "thin",
|
|
||||||
"science": "scienc",
|
|
||||||
"ice cream": "noice creem",
|
|
||||||
"spear": "speer",
|
|
||||||
"baby": "temini",
|
|
||||||
"babies": "teminis",
|
|
||||||
"child": "temini",
|
|
||||||
"children": "teminis",
|
|
||||||
"kid": "temini",
|
|
||||||
"kids": "teminis",
|
|
||||||
"bot": "xiao",
|
|
||||||
"robot": "mettatun",
|
|
||||||
"ghost": "bluuk",
|
|
||||||
"nap": "slep",
|
|
||||||
"boop": "blep",
|
|
||||||
"beep": "blep",
|
|
||||||
"bleep": "blep",
|
|
||||||
"bop": "blep",
|
|
||||||
"spider": "spoider",
|
|
||||||
"spiders": "sploiders",
|
|
||||||
"music": "moosics",
|
|
||||||
"again": "agin",
|
|
||||||
"the": "teh",
|
|
||||||
"family": "fam",
|
|
||||||
"smart": "smarts",
|
|
||||||
"smartness": "smartiness",
|
|
||||||
"intelligence": "smartiness",
|
|
||||||
"typo": "tpyo",
|
|
||||||
"typo'd": "tyop'd",
|
|
||||||
"typos": "typoys",
|
|
||||||
"yay": "yee",
|
|
||||||
"potato": "tato",
|
|
||||||
"potatoes": "tatos",
|
|
||||||
"fry": "fri",
|
|
||||||
"fries": "fri",
|
|
||||||
"burger": "glamburg",
|
|
||||||
"steak": "stek",
|
|
||||||
"heart": "hart",
|
|
||||||
"love": "lub",
|
|
||||||
"hate": "h8",
|
|
||||||
"like": "liek",
|
|
||||||
"library": "librarby",
|
|
||||||
"fire": "flemz",
|
|
||||||
"flame": "flemz",
|
|
||||||
"fires": "flemz",
|
|
||||||
"flames": "flemz",
|
|
||||||
"witchcraft": "magics",
|
|
||||||
"witchcrafts": "magics",
|
|
||||||
"magic": "magics",
|
|
||||||
"sorcery": "magics",
|
|
||||||
"superpower": "magics",
|
|
||||||
"superpowers": "magics",
|
|
||||||
"sorceries": "magics",
|
|
||||||
"and": "n",
|
|
||||||
"my": "tem's",
|
|
||||||
"mine": "tem's",
|
|
||||||
"everyone": "everytem",
|
|
||||||
"anyone": "anytem",
|
|
||||||
"someone": "sometem",
|
|
||||||
"everbody": "everytemmie",
|
|
||||||
"anybody": "anytemmie",
|
|
||||||
"somebody": "sometemmie",
|
|
||||||
"beautiful": "booftifull",
|
|
||||||
"pretty": "prety",
|
|
||||||
"so": "soooo",
|
|
||||||
"help": "halp",
|
|
||||||
"uh-uh": "nuh",
|
|
||||||
"nope": "nuh",
|
|
||||||
"nuh-uh": "nuh",
|
|
||||||
"please": "pls"
|
|
||||||
};
|
|
||||||
|
|
||||||
function translateWord(word) {
|
|
||||||
var wordTranslate = dictionary[word.toLowerCase()];
|
|
||||||
if (wordTranslate === undefined) return word;
|
|
||||||
else return applyCase(word, wordTranslate);
|
|
||||||
}
|
|
||||||
|
|
||||||
function applyCase(wordA, wordB) {
|
|
||||||
if (wordA.length === 1 && wordB.length !== 1) return wordB;
|
|
||||||
if (wordA === wordA.toUpperCase()) return wordB.toUpperCase();
|
|
||||||
if (wordA === wordA.toLowerCase()) return wordB.toLowerCase();
|
|
||||||
var firstChar = wordA.slice(0, 1);
|
|
||||||
var otherChars = wordA.slice(1);
|
|
||||||
if (firstChar === firstChar.toUpperCase() && otherChars === otherChars.toLowerCase()) {
|
|
||||||
return wordB.slice(0, 1).toUpperCase() + wordB.slice(1).toLowerCase();
|
|
||||||
}
|
|
||||||
return wordB;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isLetter(character) {
|
|
||||||
if (character.search(/[a-zA-Z'-]/) === -1) return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function translator(text) {
|
|
||||||
var translatedText = '';
|
|
||||||
var word = '';
|
|
||||||
for (var i = 0; i < text.length; i += 1) {
|
|
||||||
var character = text[i];
|
|
||||||
if (isLetter(character)) {
|
|
||||||
word += character;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (word != '') {
|
|
||||||
var wordTranslate = translateWord(word);
|
|
||||||
translatedText += wordTranslate;
|
|
||||||
word = '';
|
|
||||||
}
|
|
||||||
translatedText += character;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (word !== '') translatedText += translateWord(word);
|
|
||||||
|
|
||||||
return translatedText;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = function(text) {
|
|
||||||
const currentTranslation = translator(text);
|
|
||||||
let temmify = currentTranslation.replace(/[ing]/g, 'in');
|
|
||||||
temmify = temmify.replace(/[!]/g, '!!!!111!11!1!!!1!!!1111!');
|
|
||||||
temmify - temmify.replace(/[']/g, '');
|
|
||||||
|
|
||||||
return temmify;
|
|
||||||
};
|
|
||||||
@@ -33,7 +33,7 @@ module.exports = class InfoCommand extends Command {
|
|||||||
.addField('Shards',
|
.addField('Shards',
|
||||||
`${this.client.options.shardCount} (${this.client.shard.id})`, true)
|
`${this.client.options.shardCount} (${this.client.shard.id})`, true)
|
||||||
.addField('Commands',
|
.addField('Commands',
|
||||||
'112', true)
|
'111', true)
|
||||||
.addField('Owner',
|
.addField('Owner',
|
||||||
'dragonfire535#8081', true)
|
'dragonfire535#8081', true)
|
||||||
.addField('Source Code',
|
.addField('Source Code',
|
||||||
@@ -47,7 +47,7 @@ module.exports = class InfoCommand extends Command {
|
|||||||
.addField('Library',
|
.addField('Library',
|
||||||
'[discord.js](https://discord.js.org/#/)', true)
|
'[discord.js](https://discord.js.org/#/)', true)
|
||||||
.addField('Modules',
|
.addField('Modules',
|
||||||
'[commando](https://github.com/Gawdl3y/discord.js-commando), [pirate-speak](https://github.com/mikewesthad/pirate-speak), [zalgoize](https://github.com/clux/zalgolize), [hepburn](https://github.com/lovell/hepburn), [roman-numeral-converter-mmxvi](https://github.com/Cein-Markey/roman-numeral-conversion-library), [cowsay](https://github.com/piuccio/cowsay), [morse](https://github.com/ecto/morse), [superagent](https://github.com/visionmedia/superagent), [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/)')
|
'[commando](https://github.com/Gawdl3y/discord.js-commando), [zalgoize](https://github.com/clux/zalgolize), [superagent](https://github.com/visionmedia/superagent), [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',
|
.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)');
|
'[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)');
|
||||||
return message.embed(embed);
|
return message.embed(embed);
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
module.exports.wordTrans = (text, words) => {
|
||||||
|
text = text.split(' ');
|
||||||
|
let translation = [];
|
||||||
|
for (let i = 0; i < text.length; i++) {
|
||||||
|
const word = text[i];
|
||||||
|
const wordPuncStrip = word.replace(/[.,?!-]/g, '');
|
||||||
|
if (words[wordPuncStrip]) {
|
||||||
|
const reg = new RegExp(wordPuncStrip, 'gi');
|
||||||
|
translation.push(word.replace(reg, words[wordPuncStrip]));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
translation.push(word);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return translation.join(' ');
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports.letterTrans = (text, letters) => {
|
||||||
|
text = text.split('');
|
||||||
|
let translation = [];
|
||||||
|
for (let i = 0; i < text.length; i++) {
|
||||||
|
const letter = text[i];
|
||||||
|
if (letters[letter]) {
|
||||||
|
const reg = new RegExp(letter, 'gi');
|
||||||
|
translation.push(letter.replace(reg, letters[letter]));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
translation.push(letter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return translation.join('');
|
||||||
|
};
|
||||||
@@ -18,16 +18,11 @@
|
|||||||
<li><a href="https://discord.js.org/#/">discord.js</a></li>
|
<li><a href="https://discord.js.org/#/">discord.js</a></li>
|
||||||
<li><a href="https://github.com/Gawdl3y/discord.js-commando/">discord.js-commando</a></li>
|
<li><a href="https://github.com/Gawdl3y/discord.js-commando/">discord.js-commando</a></li>
|
||||||
<li><a href="https://github.com/oliver-moran/jimp">JIMP</a></li>
|
<li><a href="https://github.com/oliver-moran/jimp">JIMP</a></li>
|
||||||
<li><a href="https://github.com/mikewesthad/pirate-speak">pirate-speak</a></li>
|
|
||||||
<li><a href="https://github.com/clux/zalgolize">zalgoize</a></li>
|
<li><a href="https://github.com/clux/zalgolize">zalgoize</a></li>
|
||||||
<li><a href="https://github.com/lovell/hepburn">hepburn</a></li>
|
|
||||||
<li><a href="https://github.com/visionmedia/superagent">superagent</a></li>
|
<li><a href="https://github.com/visionmedia/superagent">superagent</a></li>
|
||||||
<li><a href="http://mathjs.org/">mathjs</a></li>
|
<li><a href="http://mathjs.org/">mathjs</a></li>
|
||||||
<li><a href="https://github.com/Cein-Markey/roman-numeral-conversion-library">roman-numeral-converter-mmxvi</a></li>
|
|
||||||
<li><a href="https://github.com/piuccio/cowsay">cowsay</a></li>
|
|
||||||
<li><a href="http://momentjs.com">moment</a></li>
|
<li><a href="http://momentjs.com">moment</a></li>
|
||||||
<li><a href="https://github.com/jsmreese/moment-duration-format">moment-duration-format</a></li>
|
<li><a href="https://github.com/jsmreese/moment-duration-format">moment-duration-format</a></li>
|
||||||
<li><a href="https://github.com/ecto/morse">morse</a></li>
|
|
||||||
<li><a href="https://cheerio.js.org/">cheerio</a></li>
|
<li><a href="https://cheerio.js.org/">cheerio</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>APIs</h2>
|
<h2>APIs</h2>
|
||||||
@@ -52,7 +47,7 @@
|
|||||||
<h2>Information</h2>
|
<h2>Information</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
|
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
|
||||||
<li>Command Count: 112</li>
|
<li>Command Count: 111</li>
|
||||||
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
|
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,8 +41,7 @@
|
|||||||
<li>Search Wikipedia</li>
|
<li>Search Wikipedia</li>
|
||||||
<li>Get Yu-Gi-Oh! Card Data</li>
|
<li>Get Yu-Gi-Oh! Card Data</li>
|
||||||
<li>Pirate, Binary, and Yoda Translators</li>
|
<li>Pirate, Binary, and Yoda Translators</li>
|
||||||
<li>Randomize and Shuffle Text</li>
|
<li>Reverse Text</li>
|
||||||
<li>Convert Hiragana and Katakana to Romaji</li>
|
|
||||||
<li>Translate Text</li>
|
<li>Translate Text</li>
|
||||||
<li>Zalgoize Text</li>
|
<li>Zalgoize Text</li>
|
||||||
<li>And so so so much more!</li>
|
<li>And so so so much more!</li>
|
||||||
|
|||||||
@@ -45,8 +45,7 @@
|
|||||||
<li>Search Wikipedia</li>
|
<li>Search Wikipedia</li>
|
||||||
<li>Get Yu-Gi-Oh! Card Data</li>
|
<li>Get Yu-Gi-Oh! Card Data</li>
|
||||||
<li>Pirate, Binary, and Yoda Translators</li>
|
<li>Pirate, Binary, and Yoda Translators</li>
|
||||||
<li>Randomize and Shuffle Text</li>
|
<li>Reverse Text</li>
|
||||||
<li>Convert Hiragana and Katakana to Romaji</li>
|
|
||||||
<li>Translate Text</li>
|
<li>Translate Text</li>
|
||||||
<li>Zalgoize Text</li>
|
<li>Zalgoize Text</li>
|
||||||
<li>And so so so much more!</li>
|
<li>And so so so much more!</li>
|
||||||
@@ -66,16 +65,11 @@
|
|||||||
<li><a href="https://discord.js.org/#/">discord.js</a></li>
|
<li><a href="https://discord.js.org/#/">discord.js</a></li>
|
||||||
<li><a href="https://github.com/Gawdl3y/discord.js-commando/">discord.js-commando</a></li>
|
<li><a href="https://github.com/Gawdl3y/discord.js-commando/">discord.js-commando</a></li>
|
||||||
<li><a href="https://github.com/oliver-moran/jimp">JIMP</a></li>
|
<li><a href="https://github.com/oliver-moran/jimp">JIMP</a></li>
|
||||||
<li><a href="https://github.com/mikewesthad/pirate-speak">pirate-speak</a></li>
|
|
||||||
<li><a href="https://github.com/clux/zalgolize">zalgoize</a></li>
|
<li><a href="https://github.com/clux/zalgolize">zalgoize</a></li>
|
||||||
<li><a href="https://github.com/lovell/hepburn">hepburn</a></li>
|
|
||||||
<li><a href="https://github.com/visionmedia/superagent">superagent</a></li>
|
<li><a href="https://github.com/visionmedia/superagent">superagent</a></li>
|
||||||
<li><a href="http://mathjs.org/">mathjs</a></li>
|
<li><a href="http://mathjs.org/">mathjs</a></li>
|
||||||
<li><a href="https://github.com/Cein-Markey/roman-numeral-conversion-library">roman-numeral-converter-mmxvi</a></li>
|
|
||||||
<li><a href="https://github.com/piuccio/cowsay">cowsay</a></li>
|
|
||||||
<li><a href="http://momentjs.com">moment</a></li>
|
<li><a href="http://momentjs.com">moment</a></li>
|
||||||
<li><a href="https://github.com/jsmreese/moment-duration-format">moment-duration-format</a></li>
|
<li><a href="https://github.com/jsmreese/moment-duration-format">moment-duration-format</a></li>
|
||||||
<li><a href="https://github.com/ecto/morse">morse</a></li>
|
|
||||||
<li><a href="https://cheerio.js.org/">cheerio</a></li>
|
<li><a href="https://cheerio.js.org/">cheerio</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2>APIs</h2>
|
<h2>APIs</h2>
|
||||||
@@ -101,7 +95,7 @@
|
|||||||
<h2>Information</h2>
|
<h2>Information</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
|
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
|
||||||
<li>Command Count: 112</li>
|
<li>Command Count: 111</li>
|
||||||
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
|
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -107,10 +107,6 @@ client.setTimeout(() => {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}, 14400000);
|
}, 14400000);
|
||||||
|
|
||||||
client.setInterval(() => {
|
|
||||||
console.log(`Shard ${client.shard.id} using ${process.memoryUsage().heapUsed} Bytes of Memory.`);
|
|
||||||
}, 60000);
|
|
||||||
|
|
||||||
client.on('ready', () => {
|
client.on('ready', () => {
|
||||||
console.log(`[Ready] Shard ${client.shard.id} Logged in!`);
|
console.log(`[Ready] Shard ${client.shard.id} Logged in!`);
|
||||||
client.user.setGame(`;help | Shard ${client.shard.id}`);
|
client.user.setGame(`;help | Shard ${client.shard.id}`);
|
||||||
|
|||||||
+1
-6
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "23.1.0",
|
"version": "24.0.0",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "shardingmanager.js",
|
"main": "shardingmanager.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -17,17 +17,12 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cheerio": "^0.22.0",
|
"cheerio": "^0.22.0",
|
||||||
"cowsay": "^1.1.9",
|
|
||||||
"discord.js": "hydrabolt/discord.js",
|
"discord.js": "hydrabolt/discord.js",
|
||||||
"discord.js-commando": "gawdl3y/discord.js-commando",
|
"discord.js-commando": "gawdl3y/discord.js-commando",
|
||||||
"hepburn": "^1.0.0",
|
|
||||||
"jimp": "^0.2.27",
|
"jimp": "^0.2.27",
|
||||||
"mathjs": "^3.11.0",
|
"mathjs": "^3.11.0",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
"moment-duration-format": "^1.3.0",
|
"moment-duration-format": "^1.3.0",
|
||||||
"morse": "^0.1.0",
|
|
||||||
"pirate-speak": "^1.0.1",
|
|
||||||
"roman-numeral-converter-mmxvi": "^1.0.5",
|
|
||||||
"superagent": "^3.5.2",
|
"superagent": "^3.5.2",
|
||||||
"zalgolize": "^1.2.4"
|
"zalgolize": "^1.2.4"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user