Space after conditionals

This commit is contained in:
Daniel Odendahl Jr
2017-05-08 13:46:36 +00:00
parent 7e20086b2a
commit 8ba552b21a
78 changed files with 313 additions and 379 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ module.exports = class BinaryCommand extends Command {
prompt: 'What text would you like to convert to binary?',
type: 'string',
validate: text => {
if(binary(text).length < 2000) return true;
if (binary(text).length < 2000) return true;
return 'Your text is too long.';
},
parse: text => binary(text)
+1 -1
View File
@@ -14,7 +14,7 @@ module.exports = class CowsayCommand extends Command {
prompt: 'What text would you like the cow to say?',
type: 'string',
validate: text => {
if(text.length < 1500) return true;
if (text.length < 1500) return true;
return 'Invalid Text. Text must be under 1500 characters.';
}
}
+2 -2
View File
@@ -19,8 +19,8 @@ module.exports = class EmbedCommand extends Command {
}
run(msg, args) {
if(msg.channel.type !== 'dm')
if(!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS'))
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('EMBED_LINKS'))
return msg.say('This Command requires the `Embed Links` Permission.');
const { text } = args;
const embed = new RichEmbed()
+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = class MorseCommand extends Command {
prompt: 'What text would you like to convert to morse?',
type: 'string',
validate: text => {
if(letterTrans(text, dictionary, ' ').length < 1999) return true;
if (letterTrans(text, dictionary, ' ').length < 1999) return true;
return 'Your text is too long.';
},
parse: text => letterTrans(text.toLowerCase(), dictionary, ' ')
+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = class PirateCommand extends Command {
prompt: 'What text would you like to convert to pirate?',
type: 'string',
validate: text => {
if(wordTrans(text, dictionary).length < 1999) return true;
if (wordTrans(text, dictionary).length < 1999) return true;
return 'Your text is too long.';
},
parse: text => wordTrans(text, dictionary)
+2 -5
View File
@@ -4,10 +4,7 @@ module.exports = class SayCommand extends Command {
constructor(client) {
super(client, {
name: 'say',
aliases: [
'copy',
'echo'
],
aliases: ['copy', 'echo'],
group: 'textedit',
memberName: 'say',
description: 'Make XiaoBot say what you wish.',
@@ -23,7 +20,7 @@ module.exports = class SayCommand extends Command {
}
run(msg, args) {
if(!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
if (!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
return msg.say('This Command requires the `Manage Messages` Permission.');
const { text } = args;
msg.delete();
+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = class TemmieCommand extends Command {
prompt: 'What text would you like to convert to Temmie speak?',
type: 'string',
validate: text => {
if(wordTrans(text, dictionary).length < 1999) return true;
if (wordTrans(text, dictionary).length < 1999) return true;
return 'Your text is too long.';
},
parse: text => wordTrans(text, dictionary)
+1 -3
View File
@@ -6,9 +6,7 @@ module.exports = class UpsideDownCommand extends Command {
constructor(client) {
super(client, {
name: 'upside-down',
aliases: [
'udown'
],
aliases: ['udown'],
group: 'textedit',
memberName: 'upside-down',
description: 'Flips text upside-down.',
+3 -6
View File
@@ -5,10 +5,7 @@ module.exports = class WebhookCommand extends Command {
constructor(client) {
super(client, {
name: 'webhook',
aliases: [
'rin',
'rin-say'
],
aliases: ['rin', 'rin-say'],
group: 'textedit',
memberName: 'webhook',
description: 'Posts a message to the webhook defined in your `process.env`.',
@@ -28,7 +25,7 @@ module.exports = class WebhookCommand extends Command {
}
async run(msg, args) {
if(!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
if (!msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
return msg.say('This Command requires the `Manage Messages` Permission.');
const { content } = args;
try {
@@ -37,7 +34,7 @@ module.exports = class WebhookCommand extends Command {
.post(process.env.WEBHOOK_URL)
.send({ content });
return null;
} catch(err) {
} catch (err) {
return msg.say(`An Error Occurred: ${err}`);
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ module.exports = class ZalgoCommand extends Command {
prompt: 'What text would you like to convert to zalgo?',
type: 'string',
validate: text => {
if(text.length < 500) return true;
if (text.length < 500) return true;
return 'Invalid Text. Text must be under 500 characters.';
},
parse: text => zalgo(text)