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 { KILL_ALBUM_ID } = process.env;
module.exports = class KillCommand extends Command {
module.exports = class KillCommand extends RoleplayCommand {
constructor(client) {
super(client, {
name: 'kill',
group: 'roleplay',
memberName: 'kill',
description: 'Kills a user.',
clientPermissions: ['ATTACH_FILES'],
albumID: KILL_ALBUM_ID,
args: [
{
key: 'user',
@@ -18,12 +20,7 @@ module.exports = class KillCommand extends Command {
});
}
async run(msg, { user }) {
try {
const gif = await randomFromImgurAlbum('YhwEI');
return msg.say(`_**${msg.author.username}** kills **${user.username}**._`, { files: [gif] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
generateText(msg, user) {
return `_**${msg.author.username}** kills **${user.username}**._`;
}
};