mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Only allow up to 10 items to be ranked in rank
This commit is contained in:
@@ -14,13 +14,13 @@ module.exports = class RankCommand extends Command {
|
|||||||
prompt: 'What choices do you want me rank?',
|
prompt: 'What choices do you want me rank?',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
infinite: true,
|
infinite: true,
|
||||||
max: 1950
|
max: 150
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(msg, { choices }) {
|
run(msg, { choices }) {
|
||||||
return msg.say(shuffle(choices).map((choice, i) => `**${i + 1}.** ${choice}`).join('\n'));
|
return msg.say(shuffle(choices).map((choice, i) => `**${i + 1}.** ${choice}`).slice(0, 10).join('\n'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "114.28.0",
|
"version": "114.28.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user