mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
Clean-Ups
This commit is contained in:
@@ -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,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,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 {
|
||||
|
||||
@@ -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}`));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user