Skip to content

Commit

Permalink
Fix an error in script.js related with Discord Bot TOKEN!
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayad-Uddin-Tahsin committed Oct 25, 2022
1 parent f63b9c0 commit 7939c0e
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

1 comment on commit 7939c0e

@vercel
Copy link

@vercel vercel bot commented on 7939c0e Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.