From bc5454678821d52c3bace6386a293229d72dd150 Mon Sep 17 00:00:00 2001 From: Taken Date: Mon, 4 Dec 2023 23:59:33 +0100 Subject: [PATCH] Added support for guild nameds and ids as input --- src/utils/functions/account.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/functions/account.js b/src/utils/functions/account.js index 23e1032..6f81d16 100644 --- a/src/utils/functions/account.js +++ b/src/utils/functions/account.js @@ -39,11 +39,13 @@ async function getPlayer(uuid) { return playerReq.data.player } -async function getGuild(uuid) { +async function getGuild(query, type) { + const reqType = type ? type : "player" + const guildReq = await fetch(guild, { params: { key: apikey, - player: uuid + [reqType]: query } })