mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 08:22:22 +02:00
Rank Command
This commit is contained in:
@@ -224,7 +224,7 @@ in the appropriate channel's topic to use it.
|
||||
|
||||
## Commands
|
||||
|
||||
Total: 442
|
||||
Total: 443
|
||||
|
||||
### Utility:
|
||||
|
||||
@@ -290,6 +290,7 @@ Total: 442
|
||||
* **quantum-coin:** Flips a coin that lands on some form of nothing.
|
||||
* **quote:** Responds with a random quote.
|
||||
* **random-user:** Randomly chooses a member of the server.
|
||||
* **rank:** Ranks the options you provide.
|
||||
* **rate:** Rates something.
|
||||
* **roast:** Roasts a user.
|
||||
* **roll:** Rolls a dice with a minimum/maximum value of your choice.
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { shuffle } = require('../../util/Util');
|
||||
|
||||
module.exports = class RankCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'rank',
|
||||
group: 'random-res',
|
||||
memberName: 'rank',
|
||||
description: 'Ranks the options you provide.',
|
||||
args: [
|
||||
{
|
||||
key: 'choices',
|
||||
prompt: 'What choices do you want me rank?',
|
||||
type: 'string',
|
||||
infinite: true,
|
||||
max: 1950
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { choices }) {
|
||||
return msg.say(shuffle(choices).map((choice, i) => `**${i + 1}.** ${choice}`).join('\n'));
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "114.27.1",
|
||||
"version": "114.28.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user