From afb11fed9b72add66e1c42ca62dd823c1b7fd6c8 Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 9 Apr 2023 14:17:48 +0200 Subject: [PATCH] Adding functions --- utils/functions.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/utils/functions.js b/utils/functions.js index d716a84..c7f73b2 100644 --- a/utils/functions.js +++ b/utils/functions.js @@ -11,4 +11,16 @@ async function getuuid(ign) { } } -module.exports = getuuid; \ No newline at end of file +async function getplayer(uuid) { + const slothPixel = "https://api.slothpixel.me/api/players/"; + + try { + const player = await fetch(slothPixel + uuid) + return player + } catch (error) { + return null; + } +} + +module.exports = getuuid +module.exports = getplayer \ No newline at end of file