Bugtesting for 2.0 release

This commit is contained in:
plane000
2018-06-18 20:08:53 +01:00
parent 95ff57ea6f
commit ceedb3b277
11 changed files with 255 additions and 52 deletions

View File

@@ -8,8 +8,9 @@ const Helper = require('../helper.js');
/*message object, messaage full, message args, discord client*/
module.exports.help = async function(message, msg, args, discordclient) {
module.exports.help = function(message, msg, args, discordclient) {
let commands = CommandManager.commands;
if (args[1]) {
if (commands[args[1].toLowerCase()]) {
let em = new Discord.RichEmbed();
@@ -27,15 +28,42 @@ module.exports.help = async function(message, msg, args, discordclient) {
message.channel.send(`:no_entry_sign: \`That command does not exist\``);
}
} else {
message.channel.send(`See a full command list at http://www.plane000.co.uk`); //temporary
let counter = 0;
let em = new Discord.RichEmbed();
em.setColor('BLUE');
em.setTitle('All commands: (Name, Usage)');
for (i in commands) {
counter++
if (counter == 25) {
break;
}
em.addField(commands[i].name + ', ' + commands[i].command, commands[i].usage);
}
message.channel.send(em);
let em1 = new Discord.RichEmbed();
em1.setColor('BLUE');
em1.setFooter('Do `help [command]` to see more information about the specified command');
counter = 0
for (i in commands) {
counter++
if (counter >= 25) {
em1.addField(commands[i].name + ', ' + commands[i].command, commands[i].usage);
}
}
message.channel.send(em1);
}
}
module.exports.say = async function(message, msg, args, discordclient) {
module.exports.say = function(message, msg, args, discordclient) {
message.channel.send(msg.slice(4, msg.length));
}
module.exports.version = async function(message, msg, args, discordclient) {
module.exports.version = function(message, msg, args, discordclient) {
let em = new Discord.RichEmbed();
em.setColor('BLUE');
em.setTitle('Version:');
@@ -43,7 +71,7 @@ module.exports.version = async function(message, msg, args, discordclient) {
message.channel.send(em);
}
module.exports.ping = async function(message, msg, args, discordclient) {
module.exports.ping = function(message, msg, args, discordclient) {
ping.promise.probe("discordapp.com", {
timeout: 10
}).then((output) => {
@@ -77,7 +105,7 @@ module.exports.dog = async function(message, msg, args, discordclient) {
message.channel.send(em);
}
module.exports.undo = async function (message, msg, args, discordclient) {
module.exports.undo = function (message, msg, args, discordclient) {
message.channel.fetchMessages({ limit: 50 })
.then((_messages) => {
let messages = _messages.array();
@@ -91,14 +119,14 @@ module.exports.undo = async function (message, msg, args, discordclient) {
.catch();
};
module.exports.hug = async function(message, msg, args, discordclient) {
module.exports.hug = function(message, msg, args, discordclient) {
let em = new Discord.RichEmbed();
em.setColor('BLUE');
em.setImage('https://cdn.discordapp.com/attachments/345580737149403146/442232811605458957/cat-instantly-hugs-plush-toy.gif');
message.channel.send(em);
}
module.exports.pallet = async function(message, msg, args, discordclient) {
module.exports.pallet = function(message, msg, args, discordclient) {
if(args[1]) {
if (args[1] <= 7) {
if (args[1] >= 2) {
@@ -132,11 +160,46 @@ module.exports.pallet = async function(message, msg, args, discordclient) {
}
}
module.exports.qr = async function(message, msg, args, discordclient) {
module.exports.qr = function(message, msg, args, discordclient) {
if (args[1]) {
message.channel.send('', new Discord.Attachment(qr.image(msg.substring(3), { type: 'png' })));
}
else {
message.channel.send(':no_entry_sign: \`Please provide what you want turned into a QR code\`');
}
}
module.exports.is = function(message, msg, args, discordclient) {
let thonk = Math.floor(Math.random() * 3);
if (thonk == 0) {
message.channel.send('Yes');
} else if (thonk == 1) {
message.channel.send('No');
} else {
message.channel.send('Maybe');
}
}
module.exports.are = function(message, msg, args, discordclient) {
let thonk = Math.floor(Math.random() * 3);
if (thonk == 0) {
message.channel.send('Yes');
} else if (thonk == 1) {
message.channel.send('No');
} else {
message.channel.send('Maybe');
}
}
module.exports.YEET = function(message, msg, args, discordclient) {
message.channel.send('THIS BITCH IS ***__E M P T Y__***');
}
module.exports.dab = function(message, msg, args, discordclient) {
let em = new Discord.RichEmbed();
em.setColor('BLUE');
em.setImage('https://steamuserimages-a.akamaihd.net/ugc/858355614967886347/020C871E91BC00FE277C7D58C3925CAA639F99B0/');
message.channel.send(em)
}