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
@@ -17,10 +17,7 @@ module.exports = class HungerGamesCommand extends Command {
prompt: 'Who should compete in the games? Up to 24 tributes can participate.',
type: 'string',
infinite: true,
validate: tribute => {
if (tribute.length < 25) return true;
return 'Invalid tribute, please keep each tribute under 25 characters.';
}
max: 25
}
]
});
+2 -8
View File
@@ -20,20 +20,14 @@ module.exports = class MemeCommand extends Command {
key: 'top',
prompt: 'What should the top row of the meme to be?',
type: 'string',
validate: top => {
if (top.length < 200) return true;
return 'Invalid top text, please keep the top text under 200 characters.';
},
max: 200,
parse: top => encodeURIComponent(top)
},
{
key: 'bottom',
prompt: 'What should the bottom row of the meme to be?',
type: 'string',
validate: bottom => {
if (bottom.length < 200) return true;
return 'Invalid bottom text, please keep the bottom text under 200 characters.';
},
max: 200,
parse: bottom => encodeURIComponent(bottom)
}
]
+1 -4
View File
@@ -23,10 +23,7 @@ module.exports = class BanCommand extends Command {
key: 'reason',
prompt: 'What do you want to set the reason as?',
type: 'string',
validate: reason => {
if (reason.length < 140) return true;
return 'Invalid reason, please keep the reason under 140 characters.';
}
max: 140
}
]
});
+6 -5
View File
@@ -16,16 +16,17 @@ module.exports = class HackbanCommand extends Command {
{
key: 'id',
prompt: 'What is the id of the member you want to hackban?',
type: 'string'
type: 'string',
validate: id => {
if (/^[0-9]+$/.test(id)) return true;
return 'Invalid ID.';
}
},
{
key: 'reason',
prompt: 'What do you want to set the reason as?',
type: 'string',
validate: reason => {
if (reason.length < 140) return true;
return 'Invalid reason, please keep the reason under 140 characters.';
}
max: 140
}
]
});
+1 -4
View File
@@ -23,10 +23,7 @@ module.exports = class KickCommand extends Command {
key: 'reason',
prompt: 'What do you want to set the reason as?',
type: 'string',
validate: reason => {
if (reason.length < 140) return true;
return 'Invalid reason, please keep the reason under 140 characters.';
}
max: 140
}
]
});
+2 -4
View File
@@ -21,10 +21,8 @@ module.exports = class PruneCommand extends Command {
label: 'amount of messages',
prompt: 'How many messages do you want to delete? Limit of up to 99.',
type: 'integer',
validate: count => {
if (count < 100 && count > 0) return true;
return 'Invalid count, please enter a number from 1-99.';
}
min: 1,
max: 99
}
]
});
+1 -4
View File
@@ -23,10 +23,7 @@ module.exports = class SoftbanCommand extends Command {
key: 'reason',
prompt: 'What do you want to set the reason as?',
type: 'string',
validate: reason => {
if (reason.length < 140) return true;
return 'Invalid reason, please keep the reason under 140 characters.';
}
max: 140
}
]
});
+6 -5
View File
@@ -16,16 +16,17 @@ module.exports = class UnbanCommand extends Command {
{
key: 'id',
prompt: 'What is the id of the member you want to unban?',
type: 'string'
type: 'string',
validate: id => {
if (/^[0-9]+$/.test(id)) return true;
return 'Invalid ID.';
}
},
{
key: 'reason',
prompt: 'What do you want to set the reason as?',
type: 'string',
validate: reason => {
if (reason.length < 140) return true;
return 'Invalid reason, please keep the reason under 140 characters.';
}
max: 140
}
]
});
+2 -2
View File
@@ -13,10 +13,10 @@ module.exports = class DiscriminatorCommand extends Command {
{
key: 'discrim',
prompt: 'Which discriminator would you like to search for?',
type: 'string',
type: 'integer',
default: '',
validate: discrim => {
if (/^[0-9]+$/g.test(discrim) && discrim.length === 4) return true;
if (/^[0-9]+$/.test(discrim) && discrim.length === 4) return true;
return 'Invalid discriminator.';
}
}
+1
View File
@@ -15,6 +15,7 @@ module.exports = class GenderGuessCommand extends Command {
key: 'name',
prompt: 'What name do you want to determine the gender of?',
type: 'string',
max: 1950,
parse: name => name.toLowerCase()
}
]
+2 -4
View File
@@ -15,10 +15,8 @@ module.exports = class GoogleDoodleCommand extends Command {
prompt: 'What month would you like to get doodles for?',
type: 'integer',
default: 'latest',
validate: month => {
if (month < 13 && month > 0) return true;
return 'Invalid month, please enter a number from 1-12.';
}
min: 1,
max: 12
},
{
key: 'year',
+1
View File
@@ -13,6 +13,7 @@ module.exports = class LMGTFYCommand extends Command {
key: 'query',
prompt: 'What would you like the link to search for?',
type: 'string',
max: 1950,
parse: query => encodeURIComponent(query)
}
]
+2 -8
View File
@@ -15,20 +15,14 @@ module.exports = class StrawpollCommand extends Command {
key: 'title',
prompt: 'What would you like the title of the Strawpoll to be?',
type: 'string',
validate: title => {
if (title.length < 200) return true;
return 'Invalid title, please keep the title under 200 characters.';
}
max: 200
},
{
key: 'options',
prompt: 'What options do you want to be able to pick from? You may have a maximum of 30.',
type: 'string',
infinite: true,
validate: choice => {
if (choice.length < 140) return true;
return 'Invalid option, please keep options under 140 characters each.';
}
max: 140
}
]
});
+2 -1
View File
@@ -14,7 +14,8 @@ module.exports = class EightBallCommand extends Command {
{
key: 'question',
prompt: 'What do you want to ask the 8 ball?',
type: 'string'
type: 'string',
max: 1950
}
]
});
@@ -14,7 +14,8 @@ module.exports = class CharlieCharlieChallengeCommand extends Command {
{
key: 'question',
prompt: 'What do you want to ask Charlie?',
type: 'string'
type: 'string',
max: 1950
}
]
});
+2 -1
View File
@@ -13,7 +13,8 @@ module.exports = class ChooseCommand extends Command {
key: 'choices',
prompt: 'What choices do you want me pick from?',
type: 'string',
infinite: true
infinite: true,
max: 1950
}
]
});
+6 -3
View File
@@ -13,17 +13,20 @@ module.exports = class KissMarryKillCommand extends Command {
{
key: 'thing1',
prompt: 'Who is the first person you choose?',
type: 'string'
type: 'string',
max: 500
},
{
key: 'thing2',
prompt: 'Who is the second person you choose?',
type: 'string'
type: 'string',
max: 500
},
{
key: 'thing3',
prompt: 'Who is the third person you choose?',
type: 'string'
type: 'string',
max: 500
}
]
});
+2 -1
View File
@@ -14,7 +14,8 @@ module.exports = class MagicConchCommand extends Command {
{
key: 'question',
prompt: 'What do you want to ask the magic conch?',
type: 'string'
type: 'string',
max: 1950
}
]
});
+3 -2
View File
@@ -4,7 +4,7 @@ module.exports = class RateWaifuCommand extends Command {
constructor(client) {
super(client, {
name: 'rate-waifu',
aliases: ['waifu'],
aliases: ['waifu', 'rate'],
group: 'random-res',
memberName: 'rate-waifu',
description: 'Rates your waifu.',
@@ -12,7 +12,8 @@ module.exports = class RateWaifuCommand extends Command {
{
key: 'waifu',
prompt: 'Who do you want to rate?',
type: 'string'
type: 'string',
max: 1950
}
]
});
+11 -7
View File
@@ -1,26 +1,30 @@
const { Command } = require('discord.js-commando');
const { list } = require('../../util/Util');
module.exports = class ShipCommand extends Command {
constructor(client) {
super(client, {
name: 'ship',
aliases: ['rate'],
group: 'random-res',
memberName: 'ship',
description: 'Ships things/people together.',
args: [
{
key: 'things',
prompt: 'What do you want to ship together?',
key: 'thing1',
prompt: 'Who is the first person in the ship?',
type: 'string',
infinite: true
max: 500
},
{
key: 'thing2',
prompt: 'Who is the second person in the ship?',
type: 'string',
max: 500
}
]
});
}
run(msg, { things }) {
return msg.say(`I'd give ${list(things)} a ${Math.floor(Math.random() * 100) + 1}%!`);
run(msg, { thing1, thing2 }) {
return msg.say(`I'd give ${thing1} and ${thing2} a ${Math.floor(Math.random() * 100) + 1}%!`);
}
};
+1 -1
View File
@@ -9,6 +9,7 @@ module.exports = class DanbooruCommand extends Command {
group: 'search',
memberName: 'danbooru',
description: 'Searches Danbooru for your query.',
nsfw: true,
args: [
{
key: 'query',
@@ -24,7 +25,6 @@ module.exports = class DanbooruCommand extends Command {
}
async run(msg, { query }) {
if (!msg.channel.nsfw) return msg.reply('This command can only be used in NSFW channels.');
try {
const { body } = await snekfetch
.get('https://danbooru.donmai.us/posts.json')
+1 -1
View File
@@ -12,6 +12,7 @@ module.exports = class GelbooruCommand extends Command {
group: 'search',
memberName: 'gelbooru',
description: 'Searches Gelbooru for your query.',
nsfw: true,
args: [
{
key: 'query',
@@ -23,7 +24,6 @@ module.exports = class GelbooruCommand extends Command {
}
async run(msg, { query }) {
if (!msg.channel.nsfw) return msg.reply('This command can only be used in NSFW channels.');
try {
const { text } = await snekfetch
.get('https://gelbooru.com/index.php')
+1 -1
View File
@@ -9,6 +9,7 @@ module.exports = class KonachanCommand extends Command {
group: 'search',
memberName: 'konachan',
description: 'Searches Konachan for your query.',
nsfw: true,
args: [
{
key: 'query',
@@ -20,7 +21,6 @@ module.exports = class KonachanCommand extends Command {
}
async run(msg, { query }) {
if (!msg.channel.nsfw) return msg.reply('This command can only be used in NSFW channels.');
try {
const { body } = await snekfetch
.get('https://konachan.net/post.json')
+2 -4
View File
@@ -17,10 +17,8 @@ module.exports = class MapCommand extends Command {
label: 'zoom level',
prompt: 'What would you like the zoom level to be? Must be a number from 1-20.',
type: 'integer',
validate: zoom => {
if (zoom < 21 && zoom > 0) return true;
return 'Invalid zoom level, please enter a zoom level from 1-20.';
}
min: 1,
max: 20
},
{
key: 'query',
+2 -4
View File
@@ -17,10 +17,8 @@ module.exports = class What3WordsCommand extends Command {
label: 'zoom level',
prompt: 'What would you like the zoom level to be? Must be a number from 1-20.',
type: 'integer',
validate: zoom => {
if (zoom < 21 && zoom > 0) return true;
return 'Invalid zoom level, please enter a zoom level from 1-20.';
}
min: 1,
max: 20
},
{
key: 'word1',
+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
}
]
});
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "51.3.0",
"version": "51.3.1",
"description": "Your personal server companion.",
"main": "XiaoBot.js",
"scripts": {