mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 08:19:08 +02:00
Fox Command
This commit is contained in:
@@ -15,7 +15,7 @@ You can invite the bot to your server using
|
||||
Be sure to also join the [home server](https://discord.gg/sbMe32W) for
|
||||
information and support.
|
||||
|
||||
## Commands (292)
|
||||
## Commands (293)
|
||||
### Utility:
|
||||
|
||||
* **prefix**: Shows or sets the command prefix.
|
||||
@@ -67,6 +67,7 @@ information and support.
|
||||
* **fact**: Responds with a random fact.
|
||||
* **fidget**: Responds with a random image of Fidget.
|
||||
* **fortune**: Responds with a random fortune.
|
||||
* **fox**: Responds with a random fox image.
|
||||
* **joke**: Responds with a random joke.
|
||||
* **kiss-marry-kill**: Determines who to kiss, who to marry, and who to kill.
|
||||
* **magic-conch**: Asks your question to the Magic Conch.
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('node-superfetch');
|
||||
|
||||
module.exports = class FoxCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'fox',
|
||||
group: 'random',
|
||||
memberName: 'fox',
|
||||
description: 'Responds with a random fox image.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { body } = await request.get('https://randomfox.ca/floof/');
|
||||
return msg.say({ files: [body.image] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "84.2.1",
|
||||
"version": "84.3.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user