mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
List in Ship
This commit is contained in:
@@ -21,6 +21,7 @@ module.exports = class ShipCommand extends Command {
|
||||
run(msg, args) {
|
||||
const { things } = args;
|
||||
const rating = Math.floor(Math.random() * 100) + 1;
|
||||
return msg.say(`I'd give ${things.join(' and ')} a ${rating}%!`);
|
||||
const list = `${things.slice(0, -1).join(', ')}${things.length > 1 ? ' and ' : ''}${things.slice(-1)}`;
|
||||
return msg.say(`I'd give ${list} a ${rating}%!`);
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "27.0.0",
|
||||
"version": "27.0.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user