Added support for guild nameds and ids as input

This commit is contained in:
2023-12-04 23:59:33 +01:00
parent 0d3b01bbff
commit bc54546788

View File

@@ -39,11 +39,13 @@ async function getPlayer(uuid) {
return playerReq.data.player return playerReq.data.player
} }
async function getGuild(uuid) { async function getGuild(query, type) {
const reqType = type ? type : "player"
const guildReq = await fetch(guild, { const guildReq = await fetch(guild, {
params: { params: {
key: apikey, key: apikey,
player: uuid [reqType]: query
} }
}) })