Update to latest

This commit is contained in:
Daniel Odendahl Jr
2017-11-02 22:42:12 +00:00
parent 96c762a552
commit 7560246f26
37 changed files with 89 additions and 120 deletions
+1 -4
View File
@@ -13,10 +13,7 @@ module.exports = class CowSayCommand extends Command {
key: 'text',
prompt: 'What text would you like the cow to say?',
type: 'string',
validate: text => {
if (text.length < 1500) return true;
return 'Invalid text, please keep the text under 1500 characters.';
}
max: 1500
}
]
});
+1 -4
View File
@@ -22,10 +22,7 @@ module.exports = class DECTalkCommand extends Command {
key: 'text',
prompt: 'What text do you want to convert to TTS?',
type: 'string',
validate: text => {
if (text.length < 1000) return true;
return 'Invalid text, please keep the text under 1000 characters.';
}
max: 1000
}
]
});
+1 -4
View File
@@ -14,10 +14,7 @@ module.exports = class MockingCommand extends Command {
key: 'text',
prompt: 'WHaT tEXt WoUlD yOu LiKE to COnvErt?',
type: 'string',
validate: text => {
if (text.length < 1950) return true;
return 'Invalid text, please keep the text under 1950 characters.';
},
max: 1950,
parse: text => text.toLowerCase().split('')
}
]
@@ -14,6 +14,7 @@ module.exports = class OrganizationXIIINameCommand extends Command {
key: 'text',
prompt: 'What name would you like to convert?',
type: 'string',
max: 1950,
parse: text => text.toLowerCase().split('')
}
]
+2 -5
View File
@@ -14,17 +14,14 @@ module.exports = class PortalSendCommand extends Command {
key: 'text',
prompt: 'What text would you like to send?',
type: 'string',
validate: text => {
if (/discord(\.gg|app\.com\/invite|\.me)\//gi.test(text)) return 'Please do not send invites.';
if (text.length < 1000) return true;
return 'Invalid text, please keep the text under 1000 characters.';
}
max: 1000
}
]
});
}
async run(msg, { text }) {
if (/discord(\.gg|app\.com\/invite|\.me)\//gi.test(text)) return msg.reply('Please do not send invites.');
const valid = this.client.channels.filter(channel => channel.type === 'text' && channel.guild.id !== msg.guild.id);
const channels = valid.filter(channel => channel.topic && channel.topic.toLowerCase().includes('<portal>'));
if (!channels.size) return msg.say('No channels have an open portal.');
+9 -2
View File
@@ -8,6 +8,13 @@ module.exports = class RepeatCommand extends Command {
memberName: 'repeat',
description: 'Repeat text over and over and over and over (etc).',
args: [
{
key: 'amount',
prompt: 'How many times do you want to repeat your text?',
type: 'integer',
min: 1,
max: 2000
},
{
key: 'text',
prompt: 'What text would you like to repeat over and over and over and over?',
@@ -21,7 +28,7 @@ module.exports = class RepeatCommand extends Command {
});
}
run(msg, { text }) {
return msg.say(text.repeat(2000).substr(0, 2000));
run(msg, { amount, text }) {
return msg.say(text.repeat(amount).substr(0, 2000));
}
};
+5 -1
View File
@@ -12,7 +12,11 @@ module.exports = class SayCommand extends Command {
{
key: 'text',
prompt: 'What text would you like XiaoBot to say?',
type: 'string'
type: 'string',
validate: text => {
if (!text.includes('@everyone') && !text.includes('@here')) return true;
return 'Invalid text, please do not say everyone or here mentions.';
}
}
]
});
+2 -8
View File
@@ -13,10 +13,7 @@ module.exports = class ShipNameCommand extends Command {
label: 'start name',
prompt: 'What name should be at the start of the ship name?',
type: 'string',
validate: start => {
if (start.length < 50) return true;
return 'Invalid start name, the start name must be under 50 characters.';
},
max: 500,
parse: start => start.toLowerCase()
},
{
@@ -24,10 +21,7 @@ module.exports = class ShipNameCommand extends Command {
label: 'end name',
prompt: 'What name should be at the end of the ship name?',
type: 'string',
validate: end => {
if (end.length < 50) return true;
return 'Invalid end name, the end name must be under 50 characters.';
},
max: 500,
parse: end => end.toLowerCase()
}
]
+1 -4
View File
@@ -20,10 +20,7 @@ module.exports = class TranslateCommand extends Command {
key: 'text',
prompt: 'What text would you like to translate?',
type: 'string',
validate: text => {
if (text.length < 500) return true;
return 'Invalid text, please keep the text under 500 characters.';
}
max: 500
},
{
key: 'target',
+1 -4
View File
@@ -15,10 +15,7 @@ module.exports = class YodaCommand extends Command {
key: 'sentence',
prompt: 'What sentence would you like to convert to Yoda speak?',
type: 'string',
validate: sentence => {
if (sentence.length < 500) return true;
return 'Invalid sentence, please keep the sentence under 500 characters.';
}
max: 500
}
]
});
+1 -4
View File
@@ -14,10 +14,7 @@ module.exports = class ZalgoCommand extends Command {
key: 'text',
prompt: 'What text would you like to convert to zalgo?',
type: 'string',
validate: text => {
if (text.length < 200) return true;
return 'Invalid text, please keep the text under 200 characters.';
}
max: 200
}
]
});