mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
list in Util
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { list } = require('../../structures/Util');
|
||||
|
||||
module.exports = class ShipCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -20,7 +21,6 @@ module.exports = class ShipCommand extends Command {
|
||||
|
||||
run(msg, args) {
|
||||
const { things } = args;
|
||||
const list = `${things.slice(0, -1).join(', ')}${things.length > 1 ? ' and ' : ''}${things.slice(-1)}`;
|
||||
return msg.say(`I'd give ${list} a ${Math.floor(Math.random() * 100) + 1}%!`);
|
||||
return msg.say(`I'd give ${list(things)} a ${Math.floor(Math.random() * 100) + 1}%!`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user