mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 05:54:33 +02:00
Lizard and Goose Commands
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
const Command = require('../../structures/Command');
|
||||||
|
const request = require('node-superfetch');
|
||||||
|
|
||||||
|
module.exports = class GooseCommand extends Command {
|
||||||
|
constructor(client) {
|
||||||
|
super(client, {
|
||||||
|
name: 'goose',
|
||||||
|
aliases: ['geese'],
|
||||||
|
group: 'random-img',
|
||||||
|
memberName: 'goose',
|
||||||
|
description: 'Responds with a random goose image.',
|
||||||
|
clientPermissions: ['ATTACH_FILES'],
|
||||||
|
credit: [
|
||||||
|
{
|
||||||
|
name: 'nekos.life',
|
||||||
|
url: 'https://nekos.life/',
|
||||||
|
reason: 'API'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(msg) {
|
||||||
|
try {
|
||||||
|
const { body } = await request.get('https://nekos.life/api/v2/img/goose');
|
||||||
|
return msg.say({ files: [body.url] });
|
||||||
|
} catch (err) {
|
||||||
|
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
const Command = require('../../structures/Command');
|
||||||
|
const request = require('node-superfetch');
|
||||||
|
|
||||||
|
module.exports = class LizardCommand extends Command {
|
||||||
|
constructor(client) {
|
||||||
|
super(client, {
|
||||||
|
name: 'lizard',
|
||||||
|
group: 'random-img',
|
||||||
|
memberName: 'lizard',
|
||||||
|
description: 'Responds with a random lizard image.',
|
||||||
|
clientPermissions: ['ATTACH_FILES'],
|
||||||
|
credit: [
|
||||||
|
{
|
||||||
|
name: 'nekos.life',
|
||||||
|
url: 'https://nekos.life/',
|
||||||
|
reason: 'API'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(msg) {
|
||||||
|
try {
|
||||||
|
const { body } = await request.get('https://nekos.life/api/v2/img/lizard');
|
||||||
|
return msg.say({ files: [body.url] });
|
||||||
|
} catch (err) {
|
||||||
|
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "135.1.0",
|
"version": "135.2.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user