Change Variable Names, Remove Useless Commands

This commit is contained in:
Daniel Odendahl Jr
2017-04-29 19:53:01 +00:00
parent 3c773a8952
commit 988912f471
52 changed files with 236 additions and 312 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
const { Command } = require('discord.js-commando');
const stringToBinary = (str) => {
const binary = (str) => {
const pad = '00000000';
return unescape(encodeURIComponent(str))
.split('').map(str => {
@@ -19,12 +19,12 @@ module.exports = class BinaryCommand extends Command {
key: 'text',
prompt: 'What text would you like to convert to binary?',
type: 'string',
validate: content => {
if (stringToBinary(content).length < 2000)
validate: text => {
if (binary(text).length < 2000)
return true;
return 'Your message content is too long.';
},
parse: text => stringToBinary(text)
parse: text => binary(text)
}]
});
}
+1 -1
View File
@@ -22,7 +22,7 @@ module.exports = class EmbedCommand extends Command {
return message.say('This Command requires the `Embed Links` Permission.');
const { text } = args;
const embed = new RichEmbed()
.setAuthor(message.author.username, message.author.avatarURL)
.setAuthor(message.author.username, message.author.displayAvatarURL)
.setColor(0x00AE86)
.setTimestamp()
.setDescription(text);
+2 -2
View File
@@ -13,8 +13,8 @@ module.exports = class MorseCommand extends Command {
key: 'text',
prompt: 'What text would you like to convert to morse?',
type: 'string',
validate: content => {
if (letterTrans(content, dictionary, ' ').length < 1999)
validate: text => {
if (letterTrans(text, dictionary, ' ').length < 1999)
return true;
return 'Your message content is too long.';
},
+2 -2
View File
@@ -13,8 +13,8 @@ module.exports = class PirateCommand extends Command {
key: 'text',
prompt: 'What text would you like to convert to pirate?',
type: 'string',
validate: content => {
if (wordTrans(content, dictionary).length < 1999)
validate: text => {
if (wordTrans(text, dictionary).length < 1999)
return true;
return 'Your message content is too long.';
},
+2 -2
View File
@@ -13,8 +13,8 @@ module.exports = class TemmieCommand extends Command {
key: 'text',
prompt: 'What text would you like to convert to Temmie speak?',
type: 'string',
validate: content => {
if (wordTrans(content, dictionary).length < 1999)
validate: text => {
if (wordTrans(text, dictionary).length < 1999)
return true;
return 'Your message content is too long.';
},
+3 -3
View File
@@ -12,11 +12,11 @@ module.exports = class ZalgoCommand extends Command {
key: 'text',
prompt: 'What text would you like to convert to zalgo?',
type: 'string',
validate: content => {
if (content.length < 500) {
validate: text => {
if (text.length < 500) {
return true;
}
return `Please keep your text under 500 characters, you have ${content.length}.`;
return `Please keep your text under 500 characters, you have ${text.length}.`;
},
parse: text => zalgo(text)
}]