Added support for guild nameds and ids as input
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user