mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
23 lines
710 B
JavaScript
23 lines
710 B
JavaScript
const Command = require('../../structures/Command');
|
|
|
|
module.exports = class MafiaRoleCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'mafia-role',
|
|
aliases: ['mafia-me'],
|
|
group: 'mp-games',
|
|
memberName: 'mafia-role',
|
|
description: 'Displays your current role during Mafia games.'
|
|
});
|
|
}
|
|
|
|
run(msg) {
|
|
const games = this.client.games.filter(game => game.players.has(msg.author.id) && game.name === 'mafia');
|
|
if (!games.size) return msg.reply('You aren\'t a member of any games.');
|
|
return msg.reply(games.map(game => {
|
|
const { role } = game.players.get(msg.author.id);
|
|
return `**${game.channel.guild.name} (${game.channel}):** ${role}`;
|
|
}).join('\n'));
|
|
}
|
|
};
|