mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +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 { 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}**._`;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user