From 7939c0e9efd6e96db4f86bc235026b7523da764c Mon Sep 17 00:00:00 2001 From: Sayad Uddin Tahsin <89304780+Sayad-Uddin-Tahsin@users.noreply.github.com> Date: Tue, 25 Oct 2022 13:40:29 +0000 Subject: [PATCH] Fix an error in script.js related with Discord Bot TOKEN! --- assets/js/script.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/assets/js/script.js b/assets/js/script.js index d68de3f..750d325 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -152,17 +152,4 @@ 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