mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 22:01:54 +02:00
Another Rewrite Type Thing
This commit is contained in:
@@ -20,7 +20,7 @@ You can Self-Host the bot easily, provided you have API keys and a Discord Bot T
|
||||
|
||||
APIs that require API Keys:
|
||||
|
||||
[Wattpad API](https://developer.wattpad.com/docs/api) | [Wordnik API](http://developer.wordnik.com/docs.html) | [osu! API](https://osu.ppy.sh/p/api) | [YouTube Data API](https://developers.google.com/youtube/v3/) | [Yoda Speak API](https://market.mashape.com/ismaelc/yoda-speak) | [Yandex.Translate API](https://translate.yandex.com/developers)
|
||||
[Wattpad](https://developer.wattpad.com/docs/api) | [Wordnik](http://developer.wordnik.com/docs.html) | [osu!](https://osu.ppy.sh/p/api) | [YouTube Data](https://developers.google.com/youtube/v3/) | [Yoda Speak](https://market.mashape.com/ismaelc/yoda-speak) | [Yandex.Translate](https://translate.yandex.com/developers)
|
||||
|
||||
> Note: If you do self-host, you will need to go into the file `index.js` and remove the entries for requests to Discord Bots and Carbon.
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class ContactCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'contact',
|
||||
aliases: [
|
||||
'suggest',
|
||||
'report',
|
||||
'bug'
|
||||
],
|
||||
group: 'botinfo',
|
||||
memberName: 'contact',
|
||||
description: 'Report bugs or request new features. (;contact Fix this command!)',
|
||||
examples: [';contact Fix this command!'],
|
||||
args: [{
|
||||
key: 'report',
|
||||
prompt: 'What would you like to report?',
|
||||
type: 'string'
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const messageToReport = args.report;
|
||||
const reportedMsg = await this.client.users.get(process.env.OWNER_ID).send(`**${message.author.username}#${message.author.discriminator} (${message.author.id}):**\n${messageToReport}`);
|
||||
const successMsg = await message.say('Message Sent! Thanks for your support!');
|
||||
return [reportedMsg, successMsg];
|
||||
}
|
||||
};
|
||||
@@ -15,8 +15,9 @@ module.exports = class LotteryCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const lotteryNumber = ['Winner'][Math.floor(Math.random() * 100)];
|
||||
if (lotteryNumber !== 'Winner') return message.say(`Nope, sorry ${message.author.username}, you lost.`);
|
||||
return message.say(`Wow ${message.author.username}! You actually won! Great job!`);
|
||||
const lottery = ['Winner'][Math.floor(Math.random() * 100)];
|
||||
const userName = message.member ? message.member.displayName : message.author.username;
|
||||
if (lottery !== 'Winner') return message.say(`Nope, sorry ${userName}, you lost.`);
|
||||
return message.say(`Wow ${userName}! You actually won! Great job!`);
|
||||
}
|
||||
};
|
||||
|
||||
+16
-19
@@ -30,31 +30,31 @@ module.exports = class MathGameCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const level = args.difficulty.toLowerCase();
|
||||
let randomType = ['+', '-', '*'];
|
||||
randomType = randomType[Math.floor(Math.random() * randomType.length)];
|
||||
let randomValue;
|
||||
let operation = ['+', '-', '*'];
|
||||
operation = operation[Math.floor(Math.random() * operation.length)];
|
||||
let value;
|
||||
switch (level) {
|
||||
case 'easy':
|
||||
randomValue = 10;
|
||||
value = 10;
|
||||
break;
|
||||
case 'medium':
|
||||
randomValue = 50;
|
||||
value = 50;
|
||||
break;
|
||||
case 'hard':
|
||||
randomValue = 100;
|
||||
value = 100;
|
||||
break;
|
||||
case 'extreme':
|
||||
randomValue = 1000;
|
||||
value = 1000;
|
||||
break;
|
||||
}
|
||||
const randomValue1 = Math.floor(Math.random() * randomValue) + 1;
|
||||
const randomValue2 = Math.floor(Math.random() * randomValue) + 1;
|
||||
const randomExpression = randomValue1 + randomType + randomValue2;
|
||||
const solved = math.eval(randomExpression);
|
||||
const value1 = Math.floor(Math.random() * value) + 1;
|
||||
const value2 = Math.floor(Math.random() * value) + 1;
|
||||
const expression = value1 + operation + value2;
|
||||
const solved = math.eval(expression);
|
||||
const embed = new RichEmbed()
|
||||
.setTitle('You have **ten** seconds to answer:')
|
||||
.setDescription(randomExpression);
|
||||
const embedMsg = await message.embed(embed);
|
||||
.setDescription(expression);
|
||||
await message.embed(embed);
|
||||
try {
|
||||
const collected = await message.channel.awaitMessages(response => response.author.id === message.author.id, {
|
||||
max: 1,
|
||||
@@ -62,15 +62,12 @@ module.exports = class MathGameCommand extends Command {
|
||||
errors: ['time']
|
||||
});
|
||||
if (collected.first().content !== solved.toString()) {
|
||||
const loseMsg = await message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
|
||||
return [embedMsg, loseMsg];
|
||||
return message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
|
||||
}
|
||||
const victoryMsg = await message.say(`Good Job! You won! ${solved} is the correct answer!`);
|
||||
return [embedMsg, victoryMsg];
|
||||
return message.say(`Good Job! You won! ${solved} is the correct answer!`);
|
||||
}
|
||||
catch (err) {
|
||||
const loseMsg = await message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
|
||||
return [embedMsg, loseMsg];
|
||||
return message.say(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,11 +28,11 @@ module.exports = class QuizCommand extends Command {
|
||||
count: 1
|
||||
});
|
||||
const data = response.body[0];
|
||||
const answer = data.answer.toLowerCase().split('<i>').join('').split('</i>').join('');
|
||||
const answer = data.answer.toLowerCase().replace(/(<i>|<\/i>)/g, '');
|
||||
const embed = new RichEmbed()
|
||||
.setTitle('You have **fifteen** seconds to answer this question:')
|
||||
.setDescription(`**Category: ${data.category.title}**\n${data.question}`);
|
||||
const embedMsg = await message.embed(embed);
|
||||
await message.embed(embed);
|
||||
try {
|
||||
const collected = await message.channel.awaitMessages(res => res.author.id === message.author.id, {
|
||||
max: 1,
|
||||
@@ -40,15 +40,12 @@ module.exports = class QuizCommand extends Command {
|
||||
errors: ['time']
|
||||
});
|
||||
if (collected.first().content.toLowerCase() !== answer) {
|
||||
const loseMsg = await message.say(`The correct answer is: ${answer}`);
|
||||
return [embedMsg, loseMsg];
|
||||
return message.say(`The correct answer is: ${answer}`);
|
||||
}
|
||||
const victoryMsg = await message.say(`The correct answer is: ${answer}`);
|
||||
return [embedMsg, victoryMsg];
|
||||
return message.say(`Perfect! The correct answer is: ${answer}`);
|
||||
}
|
||||
catch (err) {
|
||||
const loseMsg = await message.say(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${answer}`);
|
||||
return [embedMsg, loseMsg];
|
||||
return message.say(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${answer}`);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
|
||||
@@ -29,8 +29,8 @@ module.exports = class TypingGameCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const level = args.difficulty.toLowerCase();
|
||||
let randomSentence = ['The quick brown fox jumps over the lazy dog.', 'Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.', 'How razorback-jumping frogs can level six piqued gymnasts!', 'Amazingly few discotheques provide jukeboxes.'];
|
||||
randomSentence = randomSentence[Math.floor(Math.random() * randomSentence.length)];
|
||||
let sentence = ['The quick brown fox jumps over the lazy dog.', 'Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.', 'How razorback-jumping frogs can level six piqued gymnasts!', 'Amazingly few discotheques provide jukeboxes.'];
|
||||
sentence = sentence[Math.floor(Math.random() * sentence.length)];
|
||||
let time;
|
||||
let levelWord;
|
||||
switch (level) {
|
||||
@@ -53,24 +53,21 @@ module.exports = class TypingGameCommand extends Command {
|
||||
}
|
||||
const embed = new RichEmbed()
|
||||
.setTitle(`You have **${levelWord}** seconds to type:`)
|
||||
.setDescription(randomSentence);
|
||||
const embedMsg = await message.embed(embed);
|
||||
.setDescription(sentence);
|
||||
await message.embed(embed);
|
||||
try {
|
||||
const collected = await message.channel.awaitMessages(response => response.author.id === message.author.id, {
|
||||
max: 1,
|
||||
time: time,
|
||||
errors: ['time']
|
||||
});
|
||||
if (collected.first().content !== randomSentence) {
|
||||
const loseMsg = await message.say('Nope, your sentence does not match the original. Try again next time!');
|
||||
return [embedMsg, loseMsg];
|
||||
if (collected.first().content !== sentence) {
|
||||
return message.say('Nope, your sentence does not match the original. Try again next time!');
|
||||
}
|
||||
const victoryMsg = await message.say(`Good Job! You won!`);
|
||||
return [embedMsg, victoryMsg];
|
||||
return message.say(`Good Job! You won!`);
|
||||
}
|
||||
catch (err) {
|
||||
const loseMsg = await message.say('Aw... Too bad, try again next time!');
|
||||
return [embedMsg, loseMsg];
|
||||
return message.say('Aw... Too bad, try again next time!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ module.exports = class MemeCommand extends Command {
|
||||
prompt: 'What should the top row of the meme to be?',
|
||||
type: 'string',
|
||||
validate: toprow => {
|
||||
if (toprow.match(/^[a-zA-Z0-9|.,!?'-\s]+$/) && toprow.length < 101) {
|
||||
if (toprow.match(/^[a-zA-Z0-9.,!?'\s]+$/) && toprow.length < 101) {
|
||||
return true;
|
||||
}
|
||||
return 'Please do not use special characters and keep the rows under 100 characters each.';
|
||||
@@ -38,7 +38,7 @@ module.exports = class MemeCommand extends Command {
|
||||
prompt: 'What should the bottom row of the meme to be?',
|
||||
type: 'string',
|
||||
validate: bottomrow => {
|
||||
if (bottomrow.match(/^[a-zA-Z0-9|.,!?'-\s]+$/) && bottomrow.length < 101) {
|
||||
if (bottomrow.match(/^[a-zA-Z0-9.,!?'\s]+$/) && bottomrow.length < 101) {
|
||||
return true;
|
||||
}
|
||||
return 'Please do not use special characters and keep the rows under 100 characters each.';
|
||||
@@ -53,8 +53,10 @@ module.exports = class MemeCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return message.say(':x: Error! I don\'t have the Attach Files Permission!');
|
||||
}
|
||||
const type = args.type.toLowerCase();
|
||||
const toprow = args.toprow.split(' ').join('-').split('?').join('~q');
|
||||
const bottomrow = args.bottomrow.split(' ').join('-').split('?').join('~q');
|
||||
const toprow = args.toprow.replace(/[ ]/g, '-');
|
||||
toprow = toprow.replace(/[?]/g, '~q');
|
||||
const bottomrow = args.bottomrow.replace(/[ ]/g, '-');
|
||||
bottomrow = bottomrow.replace(/[?]/g, '~q');
|
||||
const link = `https://memegen.link/${type}/${toprow}/${bottomrow}.jpg`;
|
||||
return message.channel.sendFile(link).catch(() => message.say(':x: Error! Something went wrong!'));
|
||||
}
|
||||
|
||||
@@ -43,18 +43,16 @@ module.exports = class BanCommand extends Command {
|
||||
if (!message.guild.channels.exists('name', 'mod_logs')) return message.say(':x: Error! Could not find the mod_logs channel! Please create it!');
|
||||
const member = args.member;
|
||||
const reason = args.reason;
|
||||
if (!message.guild.member(member).bannable) return message.say(':x: Error! This member cannot be banned! Perhaps they have a higher role than me?');
|
||||
if (!member.bannable) return message.say(':x: Error! This member cannot be banned! Perhaps they have a higher role than me?');
|
||||
try {
|
||||
const banUser = await message.guild.member(member).ban();
|
||||
const okHandMsg = await message.say(':ok_hand:');
|
||||
await member.ban();
|
||||
await message.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL)
|
||||
.setColor(0xFF0000)
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${banUser.user.username}#${banUser.user.discriminator} (${member.id})\n**Action:** Ban\n**Reason:** ${reason}`);
|
||||
const modLogMsg = await message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
return [banUser, okHandMsg, modLogMsg];
|
||||
.setDescription(`**Member:** ${member.user.username}#${member.user.discriminator} (${member.id})\n**Action:** Ban\n**Reason:** ${reason}`);
|
||||
return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(':x: Error! Something went wrong!');
|
||||
|
||||
@@ -40,18 +40,16 @@ module.exports = class KickCommand extends Command {
|
||||
if (!message.guild.channels.exists('name', 'mod_logs')) return message.say(':x: Error! Could not find the mod_logs channel! Please create it!');
|
||||
const member = args.member;
|
||||
const reason = args.reason;
|
||||
if (!message.guild.member(member).bannable) return message.say(':x: Error! This member cannot be kicked! Perhaps they have a higher role than me?');
|
||||
if (!member.bannable) return message.say(':x: Error! This member cannot be kicked! Perhaps they have a higher role than me?');
|
||||
try {
|
||||
const kickUser = await message.guild.member(member).kick();
|
||||
const okHandMsg = await message.say(':ok_hand:');
|
||||
await member.kick();
|
||||
await message.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL)
|
||||
.setColor(0xFFA500)
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${kickUser.user.username}#${kickUser.user.discriminator} (${member.id})\n**Action:** Kick\n**Reason:** ${reason}`);
|
||||
const modLogMsg = await message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
return [kickUser, okHandMsg, modLogMsg];
|
||||
.setDescription(`**Member:** ${member.user.username}#${member.user.discriminator} (${member.id})\n**Action:** Kick\n**Reason:** ${reason}`);
|
||||
return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(':x: Error! Something went wrong!');
|
||||
|
||||
@@ -31,19 +31,19 @@ module.exports = class LockdownCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['READ_MESSAGES', 'SEND_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('ADMINISTRATOR')) return message.say(':x: Error! I don\'t have the Administrator permission! This is not given by default, as that\'s quite bad practice. Please give it to me to use the lockdown command!');
|
||||
}
|
||||
const type = args.type;
|
||||
if (type.toLowerCase() === 'start') {
|
||||
const type = args.type.toLowerCase();
|
||||
if (type === 'start') {
|
||||
try {
|
||||
await message.channel.overwritePermissions(message.guild.defaultRole, {
|
||||
SEND_MESSAGES: false
|
||||
});
|
||||
return message.say('**Lockdown Started, users without Administrator can no longer post messages. Please use ;lockdown stop to end the lockdown.**');
|
||||
return message.say('**Lockdown Started, users without Administrator can no longer post messages. Please use `;lockdown stop` to end the lockdown.**');
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(':x: Error! Something went wrong!');
|
||||
}
|
||||
}
|
||||
if (type.toLowerCase() === 'stop') {
|
||||
if (type === 'stop') {
|
||||
try {
|
||||
await message.channel.overwritePermissions(message.guild.defaultRole, {
|
||||
SEND_MESSAGES: true
|
||||
|
||||
@@ -51,18 +51,17 @@ module.exports = class UnbanCommand extends Command {
|
||||
const reason = args.reason;
|
||||
const bans = await message.guild.fetchBans();
|
||||
if (!bans.has(memberID)) return message.say(':x: Error! Could not find this user in the bans.');
|
||||
const unbanUserObj = await bans.get(memberID);
|
||||
const unbanUser = await bans.get(memberID);
|
||||
try {
|
||||
const unbanUser = await message.guild.unban(unbanUserObj);
|
||||
const okHandMsg = await message.say(':ok_hand:');
|
||||
await message.guild.unban(unbanUser);
|
||||
await message.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL)
|
||||
.setColor(0x00AE86)
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${unbanUser.username}#${unbanUser.discriminator} (${unbanUser.id})\n**Action:** Unban\n**Reason:** ${reason}`);
|
||||
const modLogMsg = await message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
return [unbanUser, okHandMsg, modLogMsg];
|
||||
return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(':x: Error! Something went wrong!');
|
||||
|
||||
@@ -36,19 +36,18 @@ module.exports = class WarnCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const userToWarn = args.member;
|
||||
const member = args.member;
|
||||
const reason = args.reason;
|
||||
if (!message.guild.channels.exists('name', 'mod_logs')) return message.say(':x: Error! Could not find the mod_logs channel! Please create it!');
|
||||
try {
|
||||
const okHandMsg = await message.say(':ok_hand:');
|
||||
await message.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL)
|
||||
.setColor(0xFFFF00)
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${userToWarn.user.username}#${userToWarn.user.discriminator} (${userToWarn.id})\n**Action:** Warn\n**Reason:** ${reason}`);
|
||||
const modLogMsg = await message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
return [okHandMsg, modLogMsg];
|
||||
.setDescription(`**Member:** ${member.user.username}#${member.user.discriminator} (${member.id})\n**Action:** Warn\n**Reason:** ${reason}`);
|
||||
return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(':x: Error! Something went wrong!');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const romanNumeralConverter = require('roman-numeral-converter-mmxvi');
|
||||
const { getRomanFromInteger } = require('roman-numeral-converter-mmxvi');
|
||||
|
||||
module.exports = class RomanCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -27,8 +27,8 @@ module.exports = class RomanCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const numberToRoman = args.number;
|
||||
const romanInterger = numberToRoman;
|
||||
return message.say(romanNumeralConverter.getRomanFromInteger(romanInterger));
|
||||
const number = args.number;
|
||||
const roman = getRomanFromInteger(number);
|
||||
return message.say(roman);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ module.exports = class MotivateCommand extends Command {
|
||||
'encourage',
|
||||
'justdoit'
|
||||
],
|
||||
group: 'response',
|
||||
group: 'random',
|
||||
memberName: 'motivate',
|
||||
description: 'Motivates someone. (;motivate @User)',
|
||||
examples: [';motivate @User'],
|
||||
@@ -25,7 +25,7 @@ module.exports = class MotivateCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const userToMotivate = args.thing || message.author;
|
||||
return message.say(`${userToMotivate}, https://www.youtube.com/watch?v=ZXsQAXx_ao0`);
|
||||
const motivated = args.thing || message.author;
|
||||
return message.say(`${motivated}, https://www.youtube.com/watch?v=ZXsQAXx_ao0`);
|
||||
}
|
||||
};
|
||||
@@ -4,7 +4,7 @@ module.exports = class CatCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'cat',
|
||||
group: 'response',
|
||||
group: 'randomimg',
|
||||
memberName: 'cat',
|
||||
description: 'Sends a random cat picture. (;cat)',
|
||||
examples: [';cat']
|
||||
@@ -7,7 +7,7 @@ module.exports = class PotatoCommand extends Command {
|
||||
aliases: [
|
||||
'tater'
|
||||
],
|
||||
group: 'response',
|
||||
group: 'randomimg',
|
||||
memberName: 'potato',
|
||||
description: 'Sends a random Potato picture. (;potato)',
|
||||
examples: [';potato']
|
||||
@@ -4,7 +4,7 @@ module.exports = class RandomPunCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'pun',
|
||||
group: 'response',
|
||||
group: 'randomimg',
|
||||
memberName: 'pun',
|
||||
description: 'Sends a random pun image. (;pun)',
|
||||
examples: [';pun']
|
||||
@@ -0,0 +1,25 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class VocaloidCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'vocaloid',
|
||||
aliases: [
|
||||
'vocaloidsong'
|
||||
],
|
||||
group: 'randomimg',
|
||||
memberName: 'vocaloid',
|
||||
description: 'Sends a random VOCALOID song. (;vocaloid)',
|
||||
examples: [';vocaloid']
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
let song = ['https://www.youtube.com/watch?v=ebAKoRcYFTA', 'https://www.youtube.com/watch?v=Mqps4anhz0Q', 'https://www.youtube.com/watch?v=AUEiHQOCQ2M', 'https://www.youtube.com/watch?v=oyteTOBxRm8', 'https://www.youtube.com/watch?v=uwwU55zBYlQ', 'https://www.youtube.com/watch?v=sSYoz0JmnZo', 'https://www.youtube.com/watch?v=NpU4dsXW6EI', 'https://www.youtube.com/watch?v=MzyXD8bNbvk', 'https://www.youtube.com/watch?v=hyV4qGAPKac', 'https://www.youtube.com/watch?v=pywNi6gD1FA', 'https://www.youtube.com/watch?v=17FEtaiWdVg', 'https://www.youtube.com/watch?v=fmrA-gxJxgQ', 'https://www.youtube.com/watch?v=yOBWgSPrYVA', 'https://www.youtube.com/watch?v=nCaqf9WhqOY', 'https://www.youtube.com/watch?v=cQKGUgOfD8U', 'https://www.youtube.com/watch?v=sK92X82T3Sk', 'https://www.youtube.com/watch?v=AH5_sKwDw1E', 'https://www.youtube.com/watch?v=dw-KJNqcK-Q', 'https://www.youtube.com/watch?v=X47JmmqbMvc', 'https://www.youtube.com/watch?v=ojQPpYVQt7U', 'https://www.amazon.com/Gogatsu-Yamai-feat-Kagamine-Len/dp/B00P1BG27S', 'https://www.youtube.com/watch?v=N1-Z8uslIsI', 'https://www.youtube.com/watch?v=EAgk-t2zzqw', 'https://www.youtube.com/watch?v=uLBC2kWYFo8', 'https://www.youtube.com/watch?v=OXHYIlkZLUU', 'https://www.youtube.com/watch?v=ObIa9wXbyMQ', 'https://www.youtube.com/watch?v=dGNoCICGmo0', 'https://www.youtube.com/watch?v=LcoyEZkTKfY', 'https://www.youtube.com/watch?v=mKHaW0qd5Mw', 'https://www.youtube.com/watch?v=GG627DYk_E4', 'https://www.youtube.com/watch?v=jTm6Q5Pj_Jo', 'https://www.youtube.com/watch?v=TVeIDmk3rBo', 'https://www.youtube.com/watch?v=1K3in6w9tt4', 'https://www.youtube.com/watch?v=07r67gGbtLQ', 'https://www.youtube.com/watch?v=243vPl8HdVk', 'https://www.youtube.com/watch?v=zweVJrnE1uY', 'https://www.youtube.com/watch?v=RKtoreimcQ8', 'https://www.youtube.com/watch?v=Je6dCVfHvkU', 'https://www.youtube.com/watch?v=UxFv12y_evM', 'https://www.youtube.com/watch?v=2HegQtmJeto', 'https://www.youtube.com/watch?v=8-Epnpruww0'];
|
||||
song = song[Math.floor(Math.random() * song.length)];
|
||||
return message.say(song);
|
||||
}
|
||||
};
|
||||
@@ -7,7 +7,7 @@ module.exports = class XiaoCommand extends Command {
|
||||
aliases: [
|
||||
'xiao'
|
||||
],
|
||||
group: 'response',
|
||||
group: 'randomimg',
|
||||
memberName: 'xiaopai',
|
||||
description: 'Sends a random image of Xiao Pai. (;xiaopai)',
|
||||
examples: [';xiaopai']
|
||||
@@ -19,8 +19,8 @@ module.exports = class XiaoCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return message.say(':x: Error! I don\'t have the Attach Files Permission!');
|
||||
}
|
||||
let XiaoPai = ['1.png', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg', '8.png', '9.png', '10.png', '11.png', '12.png', '13.jpg', '14.jpg', '15.png', '16.jpg', '17.png', '18.gif', '19.png', '20.jpg', '21.jpg'];
|
||||
XiaoPai = XiaoPai[Math.floor(Math.random() * XiaoPai.length)];
|
||||
return message.channel.sendFile(`./images/Xiao${XiaoPai}`);
|
||||
let xiao = ['1.png', '2.jpg', '3.jpg', '4.jpg', '5.jpg', '6.jpg', '7.jpg', '8.png', '9.png', '10.png', '11.png', '12.png', '13.jpg', '14.jpg', '15.png', '16.jpg', '17.png', '18.gif', '19.png', '20.jpg', '21.jpg'];
|
||||
xiao = xiao[Math.floor(Math.random() * xiao.length)];
|
||||
return message.channel.sendFile(`./images/Xiao${xiao}`);
|
||||
}
|
||||
};
|
||||
@@ -21,8 +21,8 @@ module.exports = class MagicBallCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const question = args.question;
|
||||
let answers = ['It is certain', 'It is decidedly so', 'Without a doubt', 'Yes definitely', 'You may rely on it', 'As I see it, yes', 'Most likely', 'Outlook good', 'Yes', 'Signs point to yes', 'Reply hazy try again', 'Ask again later', 'Better not tell you now', 'Cannot predict now', 'Concentrate and ask again', 'Don\'t count on it', 'My reply is no', 'My sources say no', 'Outlook not so good', 'Very doubtful'];
|
||||
answers = answers[Math.floor(Math.random() * answers.length)];
|
||||
return message.say(`Question: ${question}\n:8ball: ${answers} :8ball:`);
|
||||
let answer = ['It is certain', 'It is decidedly so', 'Without a doubt', 'Yes definitely', 'You may rely on it', 'As I see it, yes', 'Most likely', 'Outlook good', 'Yes', 'Signs point to yes', 'Reply hazy try again', 'Ask again later', 'Better not tell you now', 'Cannot predict now', 'Concentrate and ask again', 'Don\'t count on it', 'My reply is no', 'My sources say no', 'Outlook not so good', 'Very doubtful'];
|
||||
answer = answer[Math.floor(Math.random() * answer.length)];
|
||||
return message.say(`Question: ${question}\n:8ball: ${answer} :8ball:`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -24,8 +24,8 @@ module.exports = class ChooseCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
let choices = args.choices;
|
||||
choices = choices[Math.floor(Math.random() * choices.length)];
|
||||
return message.say(`I choose ${choices}!`);
|
||||
let choice = args.choices;
|
||||
choice = choice[Math.floor(Math.random() * choice.length)];
|
||||
return message.say(`I choose ${choice}!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,9 +21,9 @@ module.exports = class ComplimentCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToCompliment = args.thing || message.author;
|
||||
let compliments = ['Your smile is contagious.', 'You look great today.', 'You\'re a smart cookie.', 'I bet you make babies smile.', 'You have impeccable manners.', 'I like your style.', 'You have the best laugh.', 'I appreciate you.', 'You are the most perfect you there is.', 'You are enough.', 'You\'re strong.', 'Your perspective is refreshing.', 'You\'re an awesome friend.', 'You light up the room.', 'You shine brighter than a shooting star.', 'You deserve a hug right now.', 'You should be proud of yourself.', 'You\'re more helpful than you realize.', 'You have a great sense of humor.', 'You\'ve got all the right moves!', 'Is that your picture next to \'charming\' in the dictionary?', 'Your kindness is a balm to all who encounter it.', 'You\'re all that and a super-size bag of chips.', 'On a scale from 1 to 10, you\'re an 11.', 'You are brave.', 'You\'re even more beautiful on the inside than you are on the outside.', 'You have the courage of your convictions.', 'Your eyes are breathtaking.', 'If cartoon bluebirds were real, a bunch of them would be sitting on your shoulders singing right now.', 'You are making a difference.', 'You\'re like sunshine on a rainy day.', 'You bring out the best in other people.', 'Your ability to recall random factoids at just the right time is impressive.', 'You\'re a great listener.', 'How is it that you always look great, even in sweatpants?', 'Everything would be better if more people were like you!', 'I bet you sweat glitter.', 'You were cool way before hipsters were cool.', 'That color is perfect on you.', 'Hanging out with you is always a blast.', 'You always know -- and say -- exactly what I need to hear when I need to hear it.', 'You smell really good.', 'You may dance like no one\'s watching, but everyone\'s watching because you\'re an amazing dancer!', 'Being around you makes everything better!', 'When you say, \'I meant to do that,\' I totally believe you.', 'When you\'re not afraid to be yourself is when you\'re most incredible.', 'Colors seem brighter when you\'re around.', 'You\'re more fun than a ball pit filled with candy. (And seriously, what could be more fun than that?)', 'That thing you don\'t like about yourself is what makes you so interesting.', 'You\'re wonderful.', 'You have cute elbows. For reals!', 'Jokes are funnier when you tell them.', 'You\'re better than a triple-scoop ice cream cone. With sprinkles.', 'Your bellybutton is kind of adorable.', 'Your hair looks stunning.', 'You\'re one of a kind!', 'You\'re inspiring.', 'If you were a box of crayons, you\'d be the giant name-brand one with the built-in sharpener.', 'You should be thanked more often. So thank you!!', 'Our community is better because you\'re in it.', 'Someone is getting through something hard right now because you\'ve got their back.', 'You have the best ideas.', 'You always know how to find that silver lining.', 'Everyone gets knocked down sometimes, but you always get back up and keep going.', 'You\'re a candle in the darkness.', 'You\'re a great example to others.', 'Being around you is like being on a happy little vacation.', 'You always know just what to say.', 'You\'re always learning new things and trying to better yourself, which is awesome.', 'If someone based an Internet meme on you, it would have impeccable grammar.', 'You could survive a Zombie apocalypse.', 'You\'re more fun than bubble wrap.', 'When you make a mistake, you fix it.', 'Who raised you? They deserve a medal for a job well done.', 'You\'re great at figuring stuff out.', 'Your voice is magnificent.', 'The people you love are lucky to have you in their lives.', 'You\'re like a breath of fresh air.', 'You\'re gorgeous -- and that\'s the least interesting thing about you, too.', 'You\'re so thoughtful.', 'Your creative potential seems limitless.', 'Your name suits you to a T.', 'You\'re irresistible when you blush.', 'Actions speak louder than words, and yours tell an incredible story.', 'Somehow you make time stop and fly at the same time.', 'When you make up your mind about something, nothing stands in your way.', 'You seem to really know who you are.', 'Any team would be lucky to have you on it.', 'In high school I bet you were voted \'most likely to keep being awesome.\'', 'I bet you do the crossword puzzle in ink.', 'Babies and small animals probably love you.', 'If you were a scented candle they\'d call it Perfectly Imperfect (and it would smell like summer).', 'There\'s ordinary, and then there\'s you.', 'You\'re someone\'s reason to smile.', 'You\'re even better than a unicorn, because you\'re real.', 'How do you keep being so funny and making everyone laugh?', 'You have a good head on your shoulders.', 'Has anyone ever told you that you have great posture?', 'The way you treasure your loved ones is incredible.', 'You\'re really something special.', 'You\'re a gift to those around you.', 'You don\'t deserve it.'];
|
||||
compliments = compliments[Math.floor(Math.random() * compliments.length)];
|
||||
return message.say(`${thingToCompliment}, ${compliments}`);
|
||||
const complimented = args.thing || message.author;
|
||||
let compliment = ['Your smile is contagious.', 'You look great today.', 'You\'re a smart cookie.', 'I bet you make babies smile.', 'You have impeccable manners.', 'I like your style.', 'You have the best laugh.', 'I appreciate you.', 'You are the most perfect you there is.', 'You are enough.', 'You\'re strong.', 'Your perspective is refreshing.', 'You\'re an awesome friend.', 'You light up the room.', 'You shine brighter than a shooting star.', 'You deserve a hug right now.', 'You should be proud of yourself.', 'You\'re more helpful than you realize.', 'You have a great sense of humor.', 'You\'ve got all the right moves!', 'Is that your picture next to \'charming\' in the dictionary?', 'Your kindness is a balm to all who encounter it.', 'You\'re all that and a super-size bag of chips.', 'On a scale from 1 to 10, you\'re an 11.', 'You are brave.', 'You\'re even more beautiful on the inside than you are on the outside.', 'You have the courage of your convictions.', 'Your eyes are breathtaking.', 'If cartoon bluebirds were real, a bunch of them would be sitting on your shoulders singing right now.', 'You are making a difference.', 'You\'re like sunshine on a rainy day.', 'You bring out the best in other people.', 'Your ability to recall random factoids at just the right time is impressive.', 'You\'re a great listener.', 'How is it that you always look great, even in sweatpants?', 'Everything would be better if more people were like you!', 'I bet you sweat glitter.', 'You were cool way before hipsters were cool.', 'That color is perfect on you.', 'Hanging out with you is always a blast.', 'You always know -- and say -- exactly what I need to hear when I need to hear it.', 'You smell really good.', 'You may dance like no one\'s watching, but everyone\'s watching because you\'re an amazing dancer!', 'Being around you makes everything better!', 'When you say, \'I meant to do that,\' I totally believe you.', 'When you\'re not afraid to be yourself is when you\'re most incredible.', 'Colors seem brighter when you\'re around.', 'You\'re more fun than a ball pit filled with candy. (And seriously, what could be more fun than that?)', 'That thing you don\'t like about yourself is what makes you so interesting.', 'You\'re wonderful.', 'You have cute elbows. For reals!', 'Jokes are funnier when you tell them.', 'You\'re better than a triple-scoop ice cream cone. With sprinkles.', 'Your bellybutton is kind of adorable.', 'Your hair looks stunning.', 'You\'re one of a kind!', 'You\'re inspiring.', 'If you were a box of crayons, you\'d be the giant name-brand one with the built-in sharpener.', 'You should be thanked more often. So thank you!!', 'Our community is better because you\'re in it.', 'Someone is getting through something hard right now because you\'ve got their back.', 'You have the best ideas.', 'You always know how to find that silver lining.', 'Everyone gets knocked down sometimes, but you always get back up and keep going.', 'You\'re a candle in the darkness.', 'You\'re a great example to others.', 'Being around you is like being on a happy little vacation.', 'You always know just what to say.', 'You\'re always learning new things and trying to better yourself, which is awesome.', 'If someone based an Internet meme on you, it would have impeccable grammar.', 'You could survive a Zombie apocalypse.', 'You\'re more fun than bubble wrap.', 'When you make a mistake, you fix it.', 'Who raised you? They deserve a medal for a job well done.', 'You\'re great at figuring stuff out.', 'Your voice is magnificent.', 'The people you love are lucky to have you in their lives.', 'You\'re like a breath of fresh air.', 'You\'re gorgeous -- and that\'s the least interesting thing about you, too.', 'You\'re so thoughtful.', 'Your creative potential seems limitless.', 'Your name suits you to a T.', 'You\'re irresistible when you blush.', 'Actions speak louder than words, and yours tell an incredible story.', 'Somehow you make time stop and fly at the same time.', 'When you make up your mind about something, nothing stands in your way.', 'You seem to really know who you are.', 'Any team would be lucky to have you on it.', 'In high school I bet you were voted \'most likely to keep being awesome.\'', 'I bet you do the crossword puzzle in ink.', 'Babies and small animals probably love you.', 'If you were a scented candle they\'d call it Perfectly Imperfect (and it would smell like summer).', 'There\'s ordinary, and then there\'s you.', 'You\'re someone\'s reason to smile.', 'You\'re even better than a unicorn, because you\'re real.', 'How do you keep being so funny and making everyone laugh?', 'You have a good head on your shoulders.', 'Has anyone ever told you that you have great posture?', 'The way you treasure your loved ones is incredible.', 'You\'re really something special.', 'You\'re a gift to those around you.', 'You don\'t deserve it.'];
|
||||
compliment = compliment[Math.floor(Math.random() * compliment.length)];
|
||||
return message.say(`${complimented}, ${compliment}`);
|
||||
}
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -18,8 +18,8 @@ module.exports = class FortuneCookieCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
let fortunes = ['Do not seek so much to find the answer as much as to understand the question better.', 'You will soon be honored by someone you respect.', 'Happiness comes from a good life.', 'You are contemplating some action which will bring credit upon you.', 'Be prepared for extra energy.', 'You are admired for your adventurous ways.', 'The love of your life is sitting across from you.', 'Beauty is simply beauty. Originality is magical.', 'Never quit!', 'Today is an ideal time to water your personal garden.', 'Questions provide the key to unlocking our unlimited potential.', 'Expect great things and great things will come.', 'The Greatest War Sometimes Isn\'t On The Battlefield But Against Oneself.', 'Become who you are.', 'In case of fire, keep calm, pay bill and run.', 'Anyone who dares to be, can never be weak.', 'You broke my cookie!', 'Dream lofty dreams, and as you dream, so shall you become.', 'You\'ve got what it takes, but it will take everything you\'ve got!', 'Trust your intuition.', 'The wise are aware of their treasure, while fools follow their vanity.', 'You will always have good luck in your personal affairs.', 'You don\'t need talent to gain experience.', 'All the preparation you\'ve done will finally be paying off!', 'Determination is the wake-up call to the human will.', 'The most useless energy is trying to change what and who God so carefully created.', 'You cannot become rich except by enriching others.', 'Your happiness is intertwined with your outlook on life.', 'Sing and rejoice, fortune is smiling on you.', 'Well-arranged time is the surest sign of a well-arranged mind.'];
|
||||
fortunes = fortunes[Math.floor(Math.random() * fortunes.length)];
|
||||
return message.say(fortunes);
|
||||
let fortune = ['Do not seek so much to find the answer as much as to understand the question better.', 'You will soon be honored by someone you respect.', 'Happiness comes from a good life.', 'You are contemplating some action which will bring credit upon you.', 'Be prepared for extra energy.', 'You are admired for your adventurous ways.', 'The love of your life is sitting across from you.', 'Beauty is simply beauty. Originality is magical.', 'Never quit!', 'Today is an ideal time to water your personal garden.', 'Questions provide the key to unlocking our unlimited potential.', 'Expect great things and great things will come.', 'The Greatest War Sometimes Isn\'t On The Battlefield But Against Oneself.', 'Become who you are.', 'In case of fire, keep calm, pay bill and run.', 'Anyone who dares to be, can never be weak.', 'You broke my cookie!', 'Dream lofty dreams, and as you dream, so shall you become.', 'You\'ve got what it takes, but it will take everything you\'ve got!', 'Trust your intuition.', 'The wise are aware of their treasure, while fools follow their vanity.', 'You will always have good luck in your personal affairs.', 'You don\'t need talent to gain experience.', 'All the preparation you\'ve done will finally be paying off!', 'Determination is the wake-up call to the human will.', 'The most useless energy is trying to change what and who God so carefully created.', 'You cannot become rich except by enriching others.', 'Your happiness is intertwined with your outlook on life.', 'Sing and rejoice, fortune is smiling on you.', 'Well-arranged time is the surest sign of a well-arranged mind.'];
|
||||
fortune = fortune[Math.floor(Math.random() * fortune.length)];
|
||||
return message.say(fortune);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -30,18 +30,18 @@ module.exports = class RandomNameCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
let randomFirstMale = ['Bob', 'Daniel', 'Logan', 'Chris', 'Nathan', 'George', 'Mart', 'Charlie', 'Felix', 'Ralph', 'William', 'Max', 'Jerry', 'Marty', 'Joshua', 'Cody', 'Richard', 'Alex', 'Alexander', 'Jordan', 'Zachary', 'Bill', 'Alfred', 'Bruce', 'Caiden', 'Calvin', 'Eric', 'Robert', 'Mark', 'Miles', 'Nash', 'Ronald', 'Ivan', 'Edgar', 'Royal', 'Augustine', 'Dominic', 'Noel', 'Rocky', 'Grover', 'Paul', 'Jeremy', 'Stevie', 'Brock', 'Jc', 'Tony', 'Enoch', 'Zachery', 'Harvey', 'Gilbert', 'Chang', 'Emery', 'Carroll', 'Odell', 'Jean', 'Archie', 'Russ', 'Barry', 'Lowell', 'Jacob', 'Riku', 'Frederic', 'Levi', 'Faustino', 'Leland', 'Domenic', 'Irwin', 'Moises', 'Louie', 'Larry', 'Victor'];
|
||||
randomFirstMale = randomFirstMale[Math.floor(Math.random() * randomFirstMale.length)];
|
||||
let randomFirstFemale = ['Elizabeth', 'Chelsey', 'Rachel', 'Logan', 'Alex', 'Jordan', 'Mary', 'Shirley', 'Sandy', 'Linda', 'Audrey', 'Autumn', 'Gracie', 'Grace', 'Erin', 'Catherine', 'Stephanie', 'Lucy', 'Patty', 'Julie', 'Christina', 'Fiona', 'Riley', 'Ashley', 'Bree', 'Lucila', 'Wendi', 'Evangelina', 'Ricki', 'Merna', 'Tegan', 'Venus', 'Claris', 'Tana', 'Sakura', 'Edythe', 'Adena', 'Princess', 'Elnora', 'Star', 'Edyth', 'Beverly', 'Kelsie', 'Letha', 'Latisha', 'Lolita', 'Bernandine', 'Jessenia', 'Hannah', 'Leonore', 'Alene', 'Fannie', 'Bernardine', 'Leena', 'Tera', 'Yvette', 'Melisa', 'Alissa', 'Xiao', 'Richelle', 'Bridgett', 'Sumiko', 'Paulette', 'Charlott', 'Honey', 'Veola', 'Sherita', 'Amanda', 'Vannessa', 'April', 'Ruth'];
|
||||
randomFirstFemale = randomFirstFemale[Math.floor(Math.random() * randomFirstFemale.length)];
|
||||
let randomLast = ['Walker', 'Tworni', 'Ross', 'Smith', 'Odendahl', 'Deere', 'Brown', 'Williams', 'Jones', 'Miles', 'Moss', 'Roberto', 'McFly', 'McDonald', 'Lewis', 'Armstrong', 'Stevenson', 'Schwarzenegger', 'Robinson', 'Parker', 'Piper', 'Johnson', 'Brantley', 'Stewart', 'Ree', 'Talbot', 'Seville', 'Peace', 'Spielberg', 'Baggins', 'Wilborn', 'Vankirk', 'Shireman', 'Jimerson', 'Masters', 'Hack', 'Satcher', 'Younkin', 'Aguila', 'Duffey', 'Burgin', 'Highfall', 'Wee', 'Solari', 'Tomaselli', 'Basler', 'Difranco', 'Latch', 'Rives', 'Dolan', 'Abraham', 'Holter', 'Portugal', 'Lininger', 'Holst', 'Mccroy', 'Follmer', 'Hotchkiss', 'Gassaway', 'Wang', 'Agron', 'Raasch', 'Gourd', 'Czaja', 'Marquart', 'Papadopoulos', 'Ringer', 'Lax', 'Sperling', 'Galusha', 'Alston'];
|
||||
randomLast = randomLast[Math.floor(Math.random() * randomLast.length)];
|
||||
const gender = args.gender.toLowerCase();
|
||||
let lastName = ['Walker', 'Tworni', 'Ross', 'Smith', 'Odendahl', 'Deere', 'Brown', 'Williams', 'Jones', 'Miles', 'Moss', 'Roberto', 'McFly', 'McDonald', 'Lewis', 'Armstrong', 'Stevenson', 'Schwarzenegger', 'Robinson', 'Parker', 'Piper', 'Johnson', 'Brantley', 'Stewart', 'Ree', 'Talbot', 'Seville', 'Peace', 'Spielberg', 'Baggins', 'Wilborn', 'Vankirk', 'Shireman', 'Jimerson', 'Masters', 'Hack', 'Satcher', 'Younkin', 'Aguila', 'Duffey', 'Burgin', 'Highfall', 'Wee', 'Solari', 'Tomaselli', 'Basler', 'Difranco', 'Latch', 'Rives', 'Dolan', 'Abraham', 'Holter', 'Portugal', 'Lininger', 'Holst', 'Mccroy', 'Follmer', 'Hotchkiss', 'Gassaway', 'Wang', 'Agron', 'Raasch', 'Gourd', 'Czaja', 'Marquart', 'Papadopoulos', 'Ringer', 'Lax', 'Sperling', 'Galusha', 'Alston'];
|
||||
lastName = lastName[Math.floor(Math.random() * lastName.length)];
|
||||
if (gender === 'male') {
|
||||
return message.say(`${randomFirstMale} ${randomLast}`);
|
||||
let name = ['Bob', 'Daniel', 'Logan', 'Chris', 'Nathan', 'George', 'Mart', 'Charlie', 'Felix', 'Ralph', 'William', 'Max', 'Jerry', 'Marty', 'Joshua', 'Cody', 'Richard', 'Alex', 'Alexander', 'Jordan', 'Zachary', 'Bill', 'Alfred', 'Bruce', 'Caiden', 'Calvin', 'Eric', 'Robert', 'Mark', 'Miles', 'Nash', 'Ronald', 'Ivan', 'Edgar', 'Royal', 'Augustine', 'Dominic', 'Noel', 'Rocky', 'Grover', 'Paul', 'Jeremy', 'Stevie', 'Brock', 'Jc', 'Tony', 'Enoch', 'Zachery', 'Harvey', 'Gilbert', 'Chang', 'Emery', 'Carroll', 'Odell', 'Jean', 'Archie', 'Russ', 'Barry', 'Lowell', 'Jacob', 'Riku', 'Frederic', 'Levi', 'Faustino', 'Leland', 'Domenic', 'Irwin', 'Moises', 'Louie', 'Larry', 'Victor'];
|
||||
name = name[Math.floor(Math.random() * name.length)];
|
||||
return message.say(`${name} ${lastName}`);
|
||||
}
|
||||
else if (gender === 'female') {
|
||||
return message.say(`${randomFirstFemale} ${randomLast}`);
|
||||
let name = ['Elizabeth', 'Chelsey', 'Rachel', 'Logan', 'Alex', 'Jordan', 'Mary', 'Shirley', 'Sandy', 'Linda', 'Audrey', 'Autumn', 'Gracie', 'Grace', 'Erin', 'Catherine', 'Stephanie', 'Lucy', 'Patty', 'Julie', 'Christina', 'Fiona', 'Riley', 'Ashley', 'Bree', 'Lucila', 'Wendi', 'Evangelina', 'Ricki', 'Merna', 'Tegan', 'Venus', 'Claris', 'Tana', 'Sakura', 'Edythe', 'Adena', 'Princess', 'Elnora', 'Star', 'Edyth', 'Beverly', 'Kelsie', 'Letha', 'Latisha', 'Lolita', 'Bernandine', 'Jessenia', 'Hannah', 'Leonore', 'Alene', 'Fannie', 'Bernardine', 'Leena', 'Tera', 'Yvette', 'Melisa', 'Alissa', 'Xiao', 'Richelle', 'Bridgett', 'Sumiko', 'Paulette', 'Charlott', 'Honey', 'Veola', 'Sherita', 'Amanda', 'Vannessa', 'April', 'Ruth'];
|
||||
name = name[Math.floor(Math.random() * name.length)];
|
||||
return message.say(`${name} ${lastName}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,8 +23,8 @@ module.exports = class RateWaifuCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const waifuToRate = args.waifu;
|
||||
const waifu = args.waifu;
|
||||
const rating = Math.floor(Math.random() * 10) + 1;
|
||||
return message.say(`I'd give ${waifuToRate} a ${rating}/10!`);
|
||||
return message.say(`I'd give ${waifu} a ${rating}/10!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -24,14 +24,9 @@ module.exports = class RoastCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const userToRoast = args.thing || message.author;
|
||||
let roasts = ['*puts you in the oven*', 'You\'re so stupid.', 'Sorry, I can\'t hear you over how annoying you are.', 'I\'ve got better things to do.', 'You\'re as dumb as Cleverbot.', 'Your IQ is lower than the Mariana Trench.', 'You\'re so annoying even the flies stay away from your stench.', 'Go away, please.', 'I\'d give you a nasty look but you\'ve already got one.', 'It looks like your face caught fire and someone tried to put it out with a hammer.', 'Your family tree must be a cactus because everyone on it is a prick.', 'Someday you will go far, and I hope you stay there.', 'The zoo called. They\'re wondering how you got out of your cage.', 'I was hoping for a battle of wits, but you appear to be unarmed.', 'You are proof that evolution can go in reverse.', 'Brains aren\'t everything, in your case, they\'re nothing.', 'Sorry I didn\'t get that, I don\'t speak idiot.', 'Why is it acceptable for you to be an idiot, but not for me to point it out?', 'We all sprang from apes, but you did not spring far enough.', 'You\'re an unknown command.', 'If you could go anywhere I chose, I\'d choose dead.', 'Even monkeys can go to space, so clearly you lack some potential.', 'It\'s brains over brawn, yet you have neither.', 'You look like a monkey, and you smell like one too.', 'Even among idiots you\'re lacking.', 'You fail even when you\'re doing absolutely nothing.', 'If there was a vote for \'least likely to succeed\' you\'d win first prize.', 'I\'m surrounded by idiots... Or, wait, that\'s just you.', 'I wanna go home. Well, really I just want to get away from the awful aroma you\'ve got going there.', 'Every time you touch me I have to go home and wash all my clothes nine times just to get a normal smell back.', 'If I had a dollar for every brain you don\'t have, I\'d have one dollar.', 'I\'d help you succeed but you\'re incapable.'];
|
||||
roasts = roasts[Math.floor(Math.random() * roasts.length)];
|
||||
if (!userToRoast) {
|
||||
return message.reply(roasts);
|
||||
}
|
||||
else {
|
||||
return message.say(`${userToRoast}, ${roasts}`);
|
||||
}
|
||||
const roasted = args.thing || message.author;
|
||||
let roast = ['*puts you in the oven*', 'You\'re so stupid.', 'Sorry, I can\'t hear you over how annoying you are.', 'I\'ve got better things to do.', 'You\'re as dumb as Cleverbot.', 'Your IQ is lower than the Mariana Trench.', 'You\'re so annoying even the flies stay away from your stench.', 'Go away, please.', 'I\'d give you a nasty look but you\'ve already got one.', 'It looks like your face caught fire and someone tried to put it out with a hammer.', 'Your family tree must be a cactus because everyone on it is a prick.', 'Someday you will go far, and I hope you stay there.', 'The zoo called. They\'re wondering how you got out of your cage.', 'I was hoping for a battle of wits, but you appear to be unarmed.', 'You are proof that evolution can go in reverse.', 'Brains aren\'t everything, in your case, they\'re nothing.', 'Sorry I didn\'t get that, I don\'t speak idiot.', 'Why is it acceptable for you to be an idiot, but not for me to point it out?', 'We all sprang from apes, but you did not spring far enough.', 'You\'re an unknown command.', 'If you could go anywhere I chose, I\'d choose dead.', 'Even monkeys can go to space, so clearly you lack some potential.', 'It\'s brains over brawn, yet you have neither.', 'You look like a monkey, and you smell like one too.', 'Even among idiots you\'re lacking.', 'You fail even when you\'re doing absolutely nothing.', 'If there was a vote for \'least likely to succeed\' you\'d win first prize.', 'I\'m surrounded by idiots... Or, wait, that\'s just you.', 'I wanna go home. Well, really I just want to get away from the awful aroma you\'ve got going there.', 'Every time you touch me I have to go home and wash all my clothes nine times just to get a normal smell back.', 'If I had a dollar for every brain you don\'t have, I\'d have one dollar.', 'I\'d help you succeed but you\'re incapable.'];
|
||||
roast = roast[Math.floor(Math.random() * roast.length)];
|
||||
return message.say(`${roasted}, ${roast}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,8 +23,8 @@ module.exports = class ShipCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToShip = args.things;
|
||||
const shipped = args.things;
|
||||
const percentage = Math.floor(Math.random() * 100) + 1;
|
||||
return message.say(`I'd give ${thingToShip} a ${percentage}%!`);
|
||||
return message.say(`I'd give ${shipped} a ${percentage}%!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class VocaloidCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'vocaloid',
|
||||
aliases: [
|
||||
'vocaloidsong'
|
||||
],
|
||||
group: 'response',
|
||||
memberName: 'vocaloid',
|
||||
description: 'Sends a random VOCALOID song. (;vocaloid)',
|
||||
examples: [';vocaloid']
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
let songs = ['https://www.youtube.com/watch?v=ebAKoRcYFTA', 'https://www.youtube.com/watch?v=Mqps4anhz0Q', 'https://www.youtube.com/watch?v=AUEiHQOCQ2M', 'https://www.youtube.com/watch?v=oyteTOBxRm8', 'https://www.youtube.com/watch?v=uwwU55zBYlQ', 'https://www.youtube.com/watch?v=sSYoz0JmnZo', 'https://www.youtube.com/watch?v=NpU4dsXW6EI', 'https://www.youtube.com/watch?v=MzyXD8bNbvk', 'https://www.youtube.com/watch?v=hyV4qGAPKac', 'https://www.youtube.com/watch?v=pywNi6gD1FA', 'https://www.youtube.com/watch?v=17FEtaiWdVg', 'https://www.youtube.com/watch?v=fmrA-gxJxgQ', 'https://www.youtube.com/watch?v=yOBWgSPrYVA', 'https://www.youtube.com/watch?v=nCaqf9WhqOY', 'https://www.youtube.com/watch?v=cQKGUgOfD8U', 'https://www.youtube.com/watch?v=sK92X82T3Sk', 'https://www.youtube.com/watch?v=AH5_sKwDw1E', 'https://www.youtube.com/watch?v=dw-KJNqcK-Q', 'https://www.youtube.com/watch?v=X47JmmqbMvc', 'https://www.youtube.com/watch?v=ojQPpYVQt7U', 'https://www.amazon.com/Gogatsu-Yamai-feat-Kagamine-Len/dp/B00P1BG27S', 'https://www.youtube.com/watch?v=N1-Z8uslIsI', 'https://www.youtube.com/watch?v=EAgk-t2zzqw', 'https://www.youtube.com/watch?v=uLBC2kWYFo8', 'https://www.youtube.com/watch?v=OXHYIlkZLUU', 'https://www.youtube.com/watch?v=ObIa9wXbyMQ', 'https://www.youtube.com/watch?v=dGNoCICGmo0', 'https://www.youtube.com/watch?v=LcoyEZkTKfY', 'https://www.youtube.com/watch?v=mKHaW0qd5Mw', 'https://www.youtube.com/watch?v=GG627DYk_E4', 'https://www.youtube.com/watch?v=jTm6Q5Pj_Jo', 'https://www.youtube.com/watch?v=TVeIDmk3rBo', 'https://www.youtube.com/watch?v=1K3in6w9tt4', 'https://www.youtube.com/watch?v=07r67gGbtLQ', 'https://www.youtube.com/watch?v=243vPl8HdVk', 'https://www.youtube.com/watch?v=zweVJrnE1uY', 'https://www.youtube.com/watch?v=RKtoreimcQ8', 'https://www.youtube.com/watch?v=Je6dCVfHvkU', 'https://www.youtube.com/watch?v=UxFv12y_evM', 'https://www.youtube.com/watch?v=2HegQtmJeto', 'https://www.youtube.com/watch?v=8-Epnpruww0'];
|
||||
songs = songs[Math.floor(Math.random() * songs.length)];
|
||||
return message.say(songs);
|
||||
}
|
||||
};
|
||||
@@ -20,7 +20,7 @@ module.exports = class CuddleCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *cuddles* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *cuddles* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class DivorceCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *divorces* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *divorces* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class EatCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *eats* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *eats* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class FalconPunchCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *falcon punches* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *falcon punches* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class FistBumpCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *fist-bumps* ${thingToRoleplay} *badalalala*`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *fist-bumps* ${roleplayed} *badalalala*`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class HighFivesCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *high-fives* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *high-fives* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class HitwithShovelCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *hits* ${thingToRoleplay} *with a shovel*`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *hits* ${roleplayed} *with a shovel*`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class HugCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *hugs* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *hugs* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class InhaleCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *inhales* ${thingToRoleplay} *but gained no ability...*`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *inhales* ${roleplayed} *but gained no ability...*`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class KillCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *kills* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *kills* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class KissCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *kisses* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *kisses* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class MarryCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *marries* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *marries* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class PatCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *pats* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *pats* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class PokeCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *pokes* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *pokes* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class PunchCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *punches* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *punches* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class SlapCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToRoleplay = args.thing;
|
||||
return message.say(`${message.author} *slaps* ${thingToRoleplay}`);
|
||||
const roleplayed = args.thing;
|
||||
return message.say(`${message.author} *slaps* ${roleplayed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,10 +27,10 @@ module.exports = class BotSearchCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const botToFind = args.bot.id;
|
||||
const bot = args.bot.id;
|
||||
try {
|
||||
const response = await request
|
||||
.get(`https://bots.discord.pw/api/bots/${botToFind}`)
|
||||
.get(`https://bots.discord.pw/api/bots/${bot}`)
|
||||
.set({
|
||||
'Authorization': process.env.DISCORD_BOTS_KEY
|
||||
});
|
||||
|
||||
@@ -29,10 +29,10 @@ module.exports = class DefineCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const defineThis = encodeURI(args.word);
|
||||
const word = encodeURI(args.word);
|
||||
try {
|
||||
const response = await request
|
||||
.get(`http://api.wordnik.com:80/v4/word.json/${defineThis}/definitions`)
|
||||
.get(`http://api.wordnik.com:80/v4/word.json/${word}/definitions`)
|
||||
.query({
|
||||
limit: 1,
|
||||
includeRelated: false,
|
||||
|
||||
@@ -32,10 +32,10 @@ module.exports = class DiscrimCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const userToSearch = args.discrim;
|
||||
const users = await this.client.users.filter(u => u.discriminator === userToSearch).map(u => u.username).sort();
|
||||
const discrim = args.discrim;
|
||||
const users = await this.client.users.filter(u => u.discriminator === discrim).map(u => u.username).sort();
|
||||
const embed = new RichEmbed()
|
||||
.setTitle(`${users.length} Users with the discriminator: ${userToSearch}`)
|
||||
.setTitle(`${users.length} Users with the discriminator: ${discrim}`)
|
||||
.setDescription(users.join(', '));
|
||||
return message.embed(embed);
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@ module.exports = class ForecastCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const locationToSearch = args.locationQ;
|
||||
const location = args.locationQ;
|
||||
try {
|
||||
const response = await request
|
||||
.get('https://query.yahooapis.com/v1/public/yql')
|
||||
.query({
|
||||
q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${locationToSearch}")`,
|
||||
q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${location}")`,
|
||||
format: 'json'
|
||||
});
|
||||
const info = response.body.query.results.channel;
|
||||
|
||||
@@ -26,21 +26,21 @@ module.exports = class GoogleCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToSearch = args.query;
|
||||
const searchMsg = await message.say('Searching...');
|
||||
const query = args.query;
|
||||
const msg = await message.say('Searching...');
|
||||
try {
|
||||
const response = await request
|
||||
.get(`https://www.google.com/search`)
|
||||
.query({
|
||||
q: thingToSearch
|
||||
q: query
|
||||
});
|
||||
const $ = cheerio.load(response.text);
|
||||
let href = $('.r').first().find('a').first().attr('href');
|
||||
href = querystring.parse(href.replace('/url?', ''));
|
||||
return searchMsg.edit(href.q);
|
||||
return msg.edit(href.q);
|
||||
}
|
||||
catch (err) {
|
||||
return searchMsg.edit(':x: Error! No Results Found!');
|
||||
return msg.edit(':x: Error! No Results Found!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,12 +28,12 @@ module.exports = class IMDBCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const queryMovie = args.movie;
|
||||
const movie = args.movie;
|
||||
try {
|
||||
const response = await request
|
||||
.get(`http://www.omdbapi.com/`)
|
||||
.query({
|
||||
t: queryMovie,
|
||||
t: movie,
|
||||
plot: 'full'
|
||||
});
|
||||
const data = response.body;
|
||||
|
||||
@@ -28,13 +28,13 @@ module.exports = class OsuCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const usernameToSearch = args.username;
|
||||
const username = args.username;
|
||||
try {
|
||||
const response = await request
|
||||
.get('https://osu.ppy.sh/api/get_user')
|
||||
.query({
|
||||
k: process.env.OSU_KEY,
|
||||
u: usernameToSearch,
|
||||
u: username,
|
||||
type: 'string'
|
||||
});
|
||||
const data = response.body[0];
|
||||
|
||||
@@ -28,12 +28,12 @@ module.exports = class UrbanCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const wordToDefine = args.word;
|
||||
const word = args.word;
|
||||
try {
|
||||
const response = await request
|
||||
.get('http://api.urbandictionary.com/v0/define')
|
||||
.query({
|
||||
term: wordToDefine
|
||||
term: word
|
||||
});
|
||||
const data = response.body.list[0];
|
||||
const embed = new RichEmbed()
|
||||
|
||||
@@ -23,7 +23,7 @@ module.exports = class WattpadCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const queryBook = args.book;
|
||||
const book = args.book;
|
||||
try {
|
||||
const response = await request
|
||||
.get('https://api.wattpad.com:443/v4/stories')
|
||||
@@ -31,7 +31,7 @@ module.exports = class WattpadCommand extends Command {
|
||||
'Authorization': `Basic ${process.env.WATTPAD_KEY}`
|
||||
})
|
||||
.query({
|
||||
query: queryBook,
|
||||
query: book,
|
||||
limit: 1
|
||||
});
|
||||
const data = response.body.stories[0];
|
||||
|
||||
@@ -23,12 +23,12 @@ module.exports = class WeatherCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const locationToSearch = args.locationQ;
|
||||
const location = args.locationQ;
|
||||
try {
|
||||
const response = await request
|
||||
.get('https://query.yahooapis.com/v1/public/yql')
|
||||
.query({
|
||||
q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${locationToSearch}")`,
|
||||
q: `select * from weather.forecast where u='f' AND woeid in (select woeid from geo.places(1) where text="${location}")`,
|
||||
format: 'json'
|
||||
});
|
||||
const data = response.body.query.results.channel;
|
||||
|
||||
@@ -23,8 +23,8 @@ module.exports = class WikipediaCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const thingToSearch = args.query.split(')').join('%29');
|
||||
const title = encodeURI(thingToSearch);
|
||||
const query = args.query.replace(/[)]/g, '%29');
|
||||
const title = encodeURI(query);
|
||||
try {
|
||||
const response = await request
|
||||
.get(`https://en.wikipedia.org/w/api.php`)
|
||||
@@ -32,7 +32,7 @@ module.exports = class WikipediaCommand extends Command {
|
||||
action: 'query',
|
||||
prop: 'extracts',
|
||||
format: 'json',
|
||||
titles: thingToSearch,
|
||||
titles: query,
|
||||
exintro: '',
|
||||
explaintext: '',
|
||||
redirects: '',
|
||||
|
||||
@@ -26,7 +26,7 @@ module.exports = class YouTubeCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const videoToSearch = args.video;
|
||||
const video = args.video;
|
||||
try {
|
||||
const response = await request
|
||||
.get('https://www.googleapis.com/youtube/v3/search')
|
||||
@@ -34,7 +34,7 @@ module.exports = class YouTubeCommand extends Command {
|
||||
part: 'snippet',
|
||||
type: 'video',
|
||||
maxResults: 1,
|
||||
q: videoToSearch,
|
||||
q: video,
|
||||
key: process.env.YOUTUBE_KEY
|
||||
});
|
||||
const data = response.body.items[0];
|
||||
|
||||
@@ -23,10 +23,10 @@ module.exports = class YuGiOhCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const cardName = encodeURI(args.card);
|
||||
const card = encodeURI(args.card);
|
||||
try {
|
||||
const response = await request
|
||||
.get(`http://yugiohprices.com/api/card_data/${cardName}`);
|
||||
.get(`http://yugiohprices.com/api/card_data/${card}`);
|
||||
const data = response.body.data;
|
||||
if (data.card_type === 'monster') {
|
||||
const embed = new RichEmbed()
|
||||
|
||||
@@ -27,8 +27,8 @@ module.exports = class BinaryCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const turnToBinary = args.text;
|
||||
const binaryText = stringToBinary(turnToBinary);
|
||||
return message.say(binaryText);
|
||||
const text = args.text;
|
||||
const binary = stringToBinary(text);
|
||||
return message.say(binary);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,9 +21,9 @@ module.exports = class CowsayCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const turnToCowsay = args.text;
|
||||
const text = args.text;
|
||||
return message.code(null, cowsay.say({
|
||||
text: turnToCowsay,
|
||||
text: text,
|
||||
e: 'oO',
|
||||
T: 'U '
|
||||
})).catch(() => message.say(':x: Error! Perhaps the content is too long?'));
|
||||
|
||||
@@ -24,12 +24,12 @@ module.exports = class EmbedCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES')) return message.say(':x: Error! I don\'t have the Manage Messages Permission!');
|
||||
}
|
||||
const embedMessage = args.text;
|
||||
const text = args.text;
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(message.author.username, message.author.avatarURL)
|
||||
.setColor(0x00AE86)
|
||||
.setTimestamp()
|
||||
.setDescription(embedMessage);
|
||||
.setDescription(text);
|
||||
await message.delete();
|
||||
return message.embed(embed);
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ module.exports = class MorseCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const toMorse = args.text;
|
||||
const morseEncoded = morse.encode(toMorse);
|
||||
return message.say(morseEncoded);
|
||||
const text = args.text;
|
||||
const encoded = morse.encode(text);
|
||||
return message.say(encoded);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,9 +31,8 @@ module.exports = class PirateCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const turnToPirate = args.text;
|
||||
const pirate = pirateSpeak.translate(turnToPirate);
|
||||
if (pirate.length > 1950) return message.say(':x: Error! Your message is too long!');
|
||||
const text = args.text;
|
||||
const pirate = pirateSpeak.translate(text);
|
||||
return message.say(`\u180E${pirate}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,8 +20,8 @@ module.exports = class ReverseCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const stringToReverse = args.text;
|
||||
const reversed = stringToReverse.split('').reverse().join('');
|
||||
const text = args.text;
|
||||
const reversed = text.split('').reverse().join('');
|
||||
return message.say(`\u180E${reversed}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,8 +33,8 @@ module.exports = class RomajiCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const romajify = args.kana;
|
||||
const romajified = hepburn.fromKana(romajify);
|
||||
return message.say(romajified);
|
||||
const kana = args.kana;
|
||||
const romaji = hepburn.fromKana(kana);
|
||||
return message.say(romaji);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,8 +28,8 @@ module.exports = class SayCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES')) return message.say(':x: Error! I don\'t have the Manage Messages Permission!');
|
||||
}
|
||||
const copycat = args.text;
|
||||
const text = args.text;
|
||||
await message.delete();
|
||||
return message.say(`\u180E${copycat}`);
|
||||
return message.say(`\u180E${text}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -32,7 +32,8 @@ module.exports = class ShuffleCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToShuffle = args.text;
|
||||
return message.say(`\u180E${thingToShuffle.shuffle()}`);
|
||||
const text = args.text;
|
||||
const shuffled = text.shuffle();
|
||||
return message.say(`\u180E${shuffled}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,8 +27,8 @@ module.exports = class TemmieCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const thingToTranslate = args.text;
|
||||
const temmized = temmize(thingToTranslate);
|
||||
const text = args.text;
|
||||
const temmized = temmize(text);
|
||||
return message.say(`\u180E${temmized}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -232,7 +232,7 @@ const dictionary = {
|
||||
};
|
||||
|
||||
function translateWord(word) {
|
||||
let wordTranslate = dictionary[word.toLowerCase()];
|
||||
var wordTranslate = dictionary[word.toLowerCase()];
|
||||
if (wordTranslate === undefined) return word;
|
||||
else return applyCase(word, wordTranslate);
|
||||
}
|
||||
@@ -241,8 +241,8 @@ 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();
|
||||
let firstChar = wordA.slice(0, 1);
|
||||
let otherChars = wordA.slice(1);
|
||||
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();
|
||||
}
|
||||
@@ -255,16 +255,16 @@ function isLetter(character) {
|
||||
}
|
||||
|
||||
function translator(text) {
|
||||
let translatedText = '';
|
||||
let word = '';
|
||||
for (let i = 0; i < text.length; i += 1) {
|
||||
let character = text[i];
|
||||
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 != '') {
|
||||
let wordTranslate = translateWord(word);
|
||||
var wordTranslate = translateWord(word);
|
||||
translatedText += wordTranslate;
|
||||
word = '';
|
||||
}
|
||||
@@ -278,8 +278,10 @@ function translator(text) {
|
||||
}
|
||||
|
||||
module.exports = function(text) {
|
||||
let currentTranslation = translator(text);
|
||||
let temmify = currentTranslation.split('ing').join('in').split('!').join('!!!!111!11!1!!!1!!!1111!').split("'").join('');
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -135,14 +135,14 @@ module.exports = class TranslateCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!');
|
||||
}
|
||||
const languageto = args.to.toLowerCase();
|
||||
const language = args.to.toLowerCase();
|
||||
const query = args.text;
|
||||
try {
|
||||
const response = await request
|
||||
.get(`https://translate.yandex.net/api/v1.5/tr.json/translate`)
|
||||
.query({
|
||||
key: process.env.YANDEX_KEY,
|
||||
lang: languageto,
|
||||
lang: language,
|
||||
text: query
|
||||
});
|
||||
const data = response.body;
|
||||
|
||||
@@ -30,13 +30,13 @@ module.exports = class WebhookCommand extends Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('MANAGE_MESSAGES')) return message.say(':x: Error! I don\'t have the Manage Messages Permission!');
|
||||
}
|
||||
const content = args.text;
|
||||
const text = args.text;
|
||||
try {
|
||||
await message.delete();
|
||||
await request
|
||||
.post(process.env.WEBHOOK_URL)
|
||||
.send({
|
||||
content: content
|
||||
content: text
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = class YodaCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const turnToYoda = args.text;
|
||||
const text = args.text;
|
||||
try {
|
||||
const response = await request
|
||||
.get('https://yoda.p.mashape.com/yoda')
|
||||
@@ -30,7 +30,7 @@ module.exports = class YodaCommand extends Command {
|
||||
'Accept': 'text/plain'
|
||||
})
|
||||
.query({
|
||||
sentence: turnToYoda
|
||||
sentence: text
|
||||
});
|
||||
return message.say(`\u180E${response.text}`);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,8 @@ module.exports = class ZalgoCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const zalgoified = zalgo(args.text);
|
||||
const text = args.text;
|
||||
const zalgoified = zalgo(text);
|
||||
return message.say(`\u180E${zalgoified}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = class InfoCommand extends Command {
|
||||
'data',
|
||||
'information'
|
||||
],
|
||||
group: 'botinfo',
|
||||
group: 'util',
|
||||
memberName: 'info',
|
||||
description: 'Gives some bot info for your shard. (;info)',
|
||||
examples: [';info']
|
||||
@@ -33,7 +33,7 @@ module.exports = class InfoCommand extends Command {
|
||||
.addField('Shards',
|
||||
`${this.client.options.shardCount} (${this.client.shard.id})`, true)
|
||||
.addField('Commands',
|
||||
'114', true)
|
||||
'112', true)
|
||||
.addField('Owner',
|
||||
'dragonfire535#8081', true)
|
||||
.addField('Source Code',
|
||||
@@ -4,7 +4,7 @@ module.exports = class InviteCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'invite',
|
||||
group: 'botinfo',
|
||||
group: 'util',
|
||||
memberName: 'invite',
|
||||
description: 'Sends you an invite for the bot and an invite to my server. (;invite)',
|
||||
examples: [';invite']
|
||||
@@ -1,50 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class SendDMCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'senddm',
|
||||
aliases: [
|
||||
'dm',
|
||||
'recontact'
|
||||
],
|
||||
group: 'util',
|
||||
memberName: 'senddm',
|
||||
description: 'Sends a DM to a user ID.',
|
||||
examples: [';senddm 278305350804045834 This is a DM.'],
|
||||
args: [{
|
||||
key: 'userid',
|
||||
prompt: 'What is the User ID of the user you wish to contact?',
|
||||
type: 'string',
|
||||
validate: userID => {
|
||||
if (userID.length === 18) {
|
||||
return true;
|
||||
}
|
||||
return 'Invalid ID.';
|
||||
}
|
||||
}, {
|
||||
key: 'content',
|
||||
prompt: 'What would you like the content of the message to be?',
|
||||
type: 'string'
|
||||
}]
|
||||
});
|
||||
}
|
||||
hasPermission(msg) {
|
||||
return this.client.isOwner(msg.author);
|
||||
}
|
||||
|
||||
async run(message, args) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const userID = args.userid;
|
||||
const content = args.content;
|
||||
try {
|
||||
await this.client.users.get(userID).send(content);
|
||||
return message.say('Success!');
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(':x: Error! Something went wrong!');
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -9,7 +9,7 @@ module.exports = class ServersCommand extends Command {
|
||||
],
|
||||
group: 'util',
|
||||
memberName: 'servers',
|
||||
description: 'Sends a list of all server names and IDs to the log.',
|
||||
description: 'Sends a list of all server names and IDs to the log. (;servers)',
|
||||
examples: [';servers']
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,12 +11,13 @@ module.exports = class ShardInfoCommand extends Command {
|
||||
aliases: [
|
||||
'shard-info',
|
||||
'shard-data',
|
||||
'sharddata'
|
||||
'sharddata',
|
||||
'shard'
|
||||
],
|
||||
group: 'botinfo',
|
||||
group: 'util',
|
||||
memberName: 'shardinfo',
|
||||
description: 'Gives some bot info for the Shard you specify. (;info 0)',
|
||||
examples: [';info 0'],
|
||||
description: 'Gives some bot info for the Shard you specify. (;shardinfo 0)',
|
||||
examples: [';shardinfo 0'],
|
||||
args: [{
|
||||
key: 'shardID',
|
||||
prompt: 'Which Shard would you like to get data for?',
|
||||
@@ -40,15 +41,15 @@ module.exports = class ShardInfoCommand extends Command {
|
||||
const embed = new RichEmbed()
|
||||
.setColor(0x00AE86)
|
||||
.addField('Servers',
|
||||
`${guilds[shardID]} / ${guilds.reduce((prev, val) => prev + val, 0)}`, true)
|
||||
.addField('Shards',
|
||||
`${this.client.options.shardCount} (${shardID})`, true)
|
||||
.addField('Version',
|
||||
version, true)
|
||||
guilds[shardID], true)
|
||||
.addField('Shard ID',
|
||||
shardID, true)
|
||||
.addField('Memory Usage',
|
||||
`${memory[shardID]}MB`, true)
|
||||
.addField('Uptime',
|
||||
moment.duration(uptime[shardID]).format('d[d]h[h]m[m]s[s]'), true)
|
||||
.addField('Version',
|
||||
version, true)
|
||||
.addField('Node Version',
|
||||
process.version, true);
|
||||
return message.embed(embed);
|
||||
@@ -6,7 +6,7 @@ module.exports = class UptimeCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'uptime',
|
||||
group: 'botinfo',
|
||||
group: 'util',
|
||||
memberName: 'uptime',
|
||||
description: 'Displays how long the bot has been active. (;uptime)',
|
||||
examples: [';uptime']
|
||||
@@ -17,6 +17,6 @@ module.exports = class UptimeCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
return message.say(`I've been active on this shard for: **${moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')}** in **${this.client.guilds.size} Servers.**`);
|
||||
return message.say(`I've been active on this shard for: **${moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')}**!`);
|
||||
}
|
||||
};
|
||||
@@ -53,7 +53,7 @@
|
||||
<h2>Information</h2>
|
||||
<ul>
|
||||
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
|
||||
<li>Command Count: 114</li>
|
||||
<li>Command Count: 112</li>
|
||||
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<h2>Information</h2>
|
||||
<ul>
|
||||
<li><a href="https://discord.gg/fqQF8mc">Home Server</a></li>
|
||||
<li>Command Count: 114</li>
|
||||
<li>Command Count: 112</li>
|
||||
<li>Server Host: <a href="https://www.heroku.com/">Heroku</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
const commando = require('discord.js-commando');
|
||||
const request = require('superagent');
|
||||
const path = require('path');
|
||||
const client = new commando.Client({
|
||||
commandPrefix: ';',
|
||||
unknownCommandResponse: false,
|
||||
owner: process.env.OWNER_ID,
|
||||
disableEveryone: true
|
||||
});
|
||||
const path = require('path');
|
||||
|
||||
client.registry
|
||||
.registerDefaultTypes()
|
||||
.registerGroups([
|
||||
['botinfo', 'Bot Info'],
|
||||
['userinfo', 'User Info'],
|
||||
['guildinfo', 'Server Info'],
|
||||
['moderation', 'Moderation'],
|
||||
['response', 'Random Response'],
|
||||
['randomimg', 'Random Image'],
|
||||
['avataredit', 'Avatar Manipulation'],
|
||||
['textedit', 'Text Manipulation'],
|
||||
['numedit', 'Number Manipulation'],
|
||||
@@ -33,9 +33,9 @@ client.registry
|
||||
|
||||
client.on('guildCreate', async(guild) => {
|
||||
console.log(`[Guild] I have joined the guild: ${guild.name}, Owned by: ${guild.owner.user.username} (${guild.id})!`);
|
||||
const results = await client.shard.fetchClientValues('guilds.size');
|
||||
const count = results.reduce((prev, val) => prev + val, 0);
|
||||
console.log(`[Guild Count] ${count}`);
|
||||
const guilds = await client.shard.fetchClientValues('guilds.size');
|
||||
const count = guilds.reduce((prev, val) => prev + val, 0);
|
||||
console.log(`[Count] ${count}`);
|
||||
try {
|
||||
const response = await request
|
||||
.post('https://www.carbonitex.net/discord/data/botdata.php')
|
||||
@@ -66,9 +66,9 @@ client.on('guildCreate', async(guild) => {
|
||||
|
||||
client.on('guildDelete', async(guild) => {
|
||||
console.log(`[Guild] I have left the guild: ${guild.name}, Owned by: ${guild.owner.user.username} (${guild.id})...`);
|
||||
const results = await client.shard.fetchClientValues('guilds.size');
|
||||
const count = results.reduce((prev, val) => prev + val, 0);
|
||||
console.log(`[Guild Count] ${count}`);
|
||||
const guilds = await client.shard.fetchClientValues('guilds.size');
|
||||
const count = guilds.reduce((prev, val) => prev + val, 0);
|
||||
console.log(`[Count] ${count}`);
|
||||
try {
|
||||
const response = await request
|
||||
.post('https://www.carbonitex.net/discord/data/botdata.php')
|
||||
@@ -97,13 +97,14 @@ client.on('guildDelete', async(guild) => {
|
||||
}
|
||||
});
|
||||
|
||||
client.on('disconnect', () => {
|
||||
client.on('disconnect', (event) => {
|
||||
console.log(`[Disconnect] The Shard ${client.shard.id} disconnected with Code ${event.code}.`);
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
client.once('ready', () => {
|
||||
console.log('[Ready] Logged in!');
|
||||
client.user.setGame(';help | dragonfire535');
|
||||
client.on('ready', () => {
|
||||
console.log(`[Ready] Shard ${client.shard.id} Logged in!`);
|
||||
client.user.setGame(`;help | Shard ${client.shard.id}`);
|
||||
});
|
||||
|
||||
process.on('unhandledRejection', console.error);
|
||||
|
||||
Reference in New Issue
Block a user