mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
30 lines
746 B
JavaScript
30 lines
746 B
JavaScript
const Command = require('../../framework/Command');
|
|
const { PermissionFlagsBits } = require('discord.js');
|
|
const request = require('node-superfetch');
|
|
|
|
module.exports = class InspirationCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'inspiration',
|
|
aliases: ['inspire', 'inspirobot'],
|
|
group: 'random-img',
|
|
description: 'Responds with a randomly generated inspiration.',
|
|
clientPermissions: [PermissionFlagsBits.AttachFiles],
|
|
credit: [
|
|
{
|
|
name: 'InspiroBot',
|
|
url: 'https://inspirobot.me/',
|
|
reason: 'API'
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
async run(msg) {
|
|
const { text } = await request
|
|
.get('https://inspirobot.me/api')
|
|
.query({ generate: true });
|
|
return msg.say({ files: [text] });
|
|
}
|
|
};
|