From eec9fca10f49fe66098fbcb5035104b26c017624 Mon Sep 17 00:00:00 2001 From: Emily J Date: Sun, 7 Mar 2021 00:16:47 +1100 Subject: [PATCH] search members by ID :D --- bot/util/functions.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bot/util/functions.js b/bot/util/functions.js index d7ff388..7b4d587 100644 --- a/bot/util/functions.js +++ b/bot/util/functions.js @@ -129,12 +129,21 @@ class Functions { if (guild) { this.client.guilds.set(id, guild); - return guild; + return guild; } return; } + async validateUserID (guild, ID) { + const valid = /[0-9]{18}/.test(ID); + if (valid === true) { + const member = await this.getMember(guild, ID); + + if (member) return member; + } + } + async clean (text) { if (text && text.constructor.name === 'Promise') { text = await text;