Created
July 7, 2023 12:41
-
-
Save antiops/3604380c741aee2cc8dad9b3664f03fd to your computer and use it in GitHub Desktop.
Get total amount of Discord servers youre in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch('https://discord.com/api/users/@me/guilds', { | |
headers: { | |
authorization: 'YOUR_TOKEN' | |
} | |
}) | |
.then(res => res.json()) | |
.then(data => { | |
console.log(`[info] Total Server Count: ${data.length}`) | |
// Display object with all guild metadata | |
// console.log(data) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment