mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
List in Ship
This commit is contained in:
@@ -21,6 +21,7 @@ module.exports = class ShipCommand extends Command {
|
|||||||
run(msg, args) {
|
run(msg, args) {
|
||||||
const { things } = args;
|
const { things } = args;
|
||||||
const rating = Math.floor(Math.random() * 100) + 1;
|
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",
|
"name": "xiaobot",
|
||||||
"version": "27.0.0",
|
"version": "27.0.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user