diff --git a/assets/js/script.js b/assets/js/script.js index 750d325..d68de3f 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -152,4 +152,17 @@ function intersectionObserverHandler(intersectionObserverEntries) { counter(); observer.unobserve(elem); } +} +const fetch = require('node-fetch') +const token = 'MTAzNDAwNjIyODk0NDMxMDMwMg.G-YEfC.fmV6R6Ml4UvFbMdmfk34qhn0gv1Qnu1NMFWrEg' + +const fetchUser = async id => { + const response = await fetch(`https://discord.com/api/v9/users/${id}`, { + headers: { + Authorization: `Bot ${token}` + } + }) + if (!response.ok) throw new Error(`Error status code: ${response.status}`) + console.log(response.status) + return JSON.parse(await response.json()) } \ No newline at end of file diff --git a/index.html b/index.html index d91fd9c..fd86301 100644 --- a/index.html +++ b/index.html @@ -29,15 +29,53 @@ crossorigin="anonymous" referrerpolicy="no-referrer" /> + - - + + -