mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
Refactor roleplay commands, bro-hoof, meme, remove face, add dotenv support
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { randomFromImgurAlbum } = require('../../util/Util');
|
||||
const RoleplayCommand = require('../../structures/commands/Roleplay');
|
||||
const { EVOLVE_ALBUM_ID } = process.env;
|
||||
|
||||
module.exports = class EvolveCommand extends Command {
|
||||
module.exports = class EvolveCommand extends RoleplayCommand {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'evolve',
|
||||
group: 'roleplay',
|
||||
memberName: 'evolve',
|
||||
description: 'Evolves a user.',
|
||||
clientPermissions: ['ATTACH_FILES'],
|
||||
albumID: EVOLVE_ALBUM_ID,
|
||||
args: [
|
||||
{
|
||||
key: 'user',
|
||||
@@ -18,12 +20,7 @@ module.exports = class EvolveCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { user }) {
|
||||
try {
|
||||
const gif = await randomFromImgurAlbum('QaDeO');
|
||||
return msg.say(`_**${user.username}** is evolving!_`, { files: [gif] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
generateText(msg, user) {
|
||||
return `_**${user.username}** is evolving!_`;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user