diff --git a/commands/random-res/ship.js b/commands/random-res/ship.js index 609c3654..4148a9e9 100644 --- a/commands/random-res/ship.js +++ b/commands/random-res/ship.js @@ -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}%!`); } }; diff --git a/package.json b/package.json index 352ca2e2..b8ee5cdb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "27.0.0", + "version": "27.0.1", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {