mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
23
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class CatCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'cat',
|
||||
aliases: ['neko'],
|
||||
group: 'random-img',
|
||||
memberName: 'cat',
|
||||
description: 'Responds with a random cat image.'
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
const { body } = await snekfetch
|
||||
.get('http://random.cat/meow');
|
||||
return msg.say(body.file);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class DogCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'dog',
|
||||
group: 'random-img',
|
||||
memberName: 'dog',
|
||||
description: 'Responds with a random dog image.'
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
const { body } = await snekfetch
|
||||
.get('https://random.dog/woof.json');
|
||||
return msg.say(body.url);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const songs = require('../../assets/json/vocaloid');
|
||||
|
||||
module.exports = class VocaloidCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'vocaloid',
|
||||
group: 'random-img',
|
||||
memberName: 'vocaloid',
|
||||
description: 'Responds with a random VOCALOID song.'
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
const song = songs[Math.floor(Math.random() * songs.length)];
|
||||
return msg.say(song);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const xiaos = require('../../assets/json/xiao');
|
||||
|
||||
module.exports = class XiaoCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'xiao',
|
||||
aliases: ['xiao-pai'],
|
||||
group: 'random-img',
|
||||
memberName: 'xiao',
|
||||
description: 'Responds with a random image of Xiao Pai.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
const xiao = xiaos[Math.floor(Math.random() * xiaos.length)];
|
||||
return msg.say({ files: [xiao] });
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user