Refactor roleplay commands, bro-hoof, meme, remove face, add dotenv support

This commit is contained in:
Daniel Odendahl Jr
2018-08-28 22:26:58 +00:00
parent 5f81ce16c3
commit a4518c05ce
35 changed files with 349 additions and 287 deletions
+7 -10
View File
@@ -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!_`;
}
};