mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 22:01:54 +02:00
Fix filterArray
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class MafiaCommand extends Command {
|
||||
for (const player of players.values()) {
|
||||
if (player.role.includes('pleb')) continue;
|
||||
await msg.say(`The ${player.role} is making their decision...`);
|
||||
const valid = players.filterArray(p => p.role !== player.role);
|
||||
const valid = Array.from(players.filter(p => p.role !== player.role).values());
|
||||
await player.user.send(stripIndents`
|
||||
${questions[player.role]} Please type the number.
|
||||
${valid.map((p, i) => `**${i + 1}.** ${p.user.tag}`).join('\n')}
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = class WizardConventionCommand extends Command {
|
||||
for (const player of players.values()) {
|
||||
if (player.role.includes('pleb')) continue;
|
||||
await msg.say(`The ${player.role} is making their decision...`);
|
||||
const valid = players.filterArray(p => p.role !== player.role);
|
||||
const valid = Array.from(players.filter(p => p.role !== player.role).values());
|
||||
await player.user.send(stripIndents`
|
||||
${questions[player.role]} Please type the number.
|
||||
${valid.map((p, i) => `**${i + 1}.** ${p.user.tag}`).join('\n')}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "98.1.1",
|
||||
"version": "98.1.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user