Rank Command

This commit is contained in:
Dragon Fire
2020-05-24 00:29:42 -04:00
parent 91d45c0210
commit 142941d534
3 changed files with 29 additions and 2 deletions
+2 -1
View File
@@ -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.
+26
View File
@@ -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
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "114.27.1",
"version": "114.28.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {