From 547784d853ecc6c9a28a7548b4222074ef2f4287 Mon Sep 17 00:00:00 2001 From: Neko Life Date: Tue, 11 May 2021 14:17:01 +0000 Subject: [PATCH] Looks change --- resources/functions.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/resources/functions.js b/resources/functions.js index a371d90..32c0a72 100644 --- a/resources/functions.js +++ b/resources/functions.js @@ -138,14 +138,16 @@ async function ranLog(msg, cmd, addition) { * @param {Boolean} withID - Include user_ID * @returns {String} */ -function multipleMembersFound(client, msg, arr, key, max = 5, withID) { - if (arr.length > 1) { +function multipleMembersFound(client, msg, arr, key, max = 4, withID) { + arr = arr.slice(1); + if (arr.length > 0) { try { let multipleFound = []; for(const one of arr) { - let mes = one.user.tag; + const user = one.user ?? one; + let mes = user.tag; if (withID) { - mes = mes + ` (${one.user.id})`; + mes = mes + ` (${user.id})`; } multipleFound.push(mes); } @@ -360,8 +362,9 @@ function findRoleRegEx(msg, name) { * @param {Boolean} withID - Include channel_ID * @returns {String} */ -function multipleChannelsFound(client, msg, arr, key, max = 5, withID) { - if (arr.length > 1) { +function multipleChannelsFound(client, msg, arr, key, max = 4, withID) { + arr = arr.slice(1); + if (arr.length > 0) { try { let multipleFound = []; for(const one of arr) { @@ -400,8 +403,9 @@ function multipleChannelsFound(client, msg, arr, key, max = 5, withID) { * @param {Boolean} withID - Include role_ID * @returns {String} */ - function multipleRolesFound(client, msg, arr, key, max = 5, withID) { - if (arr.length > 1) { + function multipleRolesFound(client, msg, arr, key, max = 4, withID) { + arr = arr.slice(1); + if (arr.length > 0) { try { let multipleFound = []; for(const one of arr) {