Clean-Ups

This commit is contained in:
Daniel Odendahl Jr
2017-05-31 04:41:01 +00:00
parent 21ebcf8537
commit 7802bb49cb
142 changed files with 351 additions and 495 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
const { Command } = require('discord.js-commando');
const Command = require('../../structures/Command');
const snekfetch = require('snekfetch');
module.exports = class CatCommand extends Command {
+1 -1
View File
@@ -1,4 +1,4 @@
const { Command } = require('discord.js-commando');
const Command = require('../../structures/Command');
const snekfetch = require('snekfetch');
module.exports = class DogCommand extends Command {
+1 -1
View File
@@ -1,4 +1,4 @@
const { Command } = require('discord.js-commando');
const Command = require('../../structures/Command');
const songs = require('../../assets/json/vocaloid');
module.exports = class VocaloidCommand extends Command {
+3 -5
View File
@@ -1,4 +1,4 @@
const { Command } = require('discord.js-commando');
const Command = require('../../structures/Command');
const path = require('path');
module.exports = class XiaoCommand extends Command {
@@ -8,14 +8,12 @@ module.exports = class XiaoCommand extends Command {
aliases: ['xiao-pai'],
group: 'randomimg',
memberName: 'xiao',
description: 'Sends a random image of Xiao Pai.'
description: 'Sends a random image of Xiao Pai.',
clientPermissions: ['ATTACH_FILES']
});
}
run(msg) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const xiao = Math.floor(Math.random() * 10) + 1;
return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', `xiao${xiao}.png`)] })
.catch(err => msg.say(`${err.name}: ${err.message}`));
+2 -4
View File
@@ -1,4 +1,4 @@
const { Command } = require('discord.js-commando');
const Command = require('../../structures/Command');
const { RichEmbed } = require('discord.js');
const snekfetch = require('snekfetch');
@@ -10,6 +10,7 @@ module.exports = class XKCDCommand extends Command {
group: 'randomimg',
memberName: 'xkcd',
description: 'Gets an XKCD Comic, optionally opting for today\'s.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'type',
@@ -26,9 +27,6 @@ module.exports = class XKCDCommand extends Command {
}
async run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { type } = args;
try {
const current = await snekfetch