Emin
Emin

Reputation: 41

Discord bot to see which servers the logged in user is on

I'm trying to make a Discord server list, but I have no idea how to see which servers the users are on. disboard.org i will give an example sample: enter image description here

If you found the Discord server list infrastructure from somewhere or if you have a link to the infrastructure, can you send it to me?

Upvotes: 0

Views: 5039

Answers (1)

futur
futur

Reputation: 1843

Discord's OAuth2 API contains the guilds scope, allowing an application to access an authorized user's guilds. After authenticating with OAuth2, you can GET /users/@me/guilds to retrieve a list of guilds that the user is in. This returns a partial guild object containing the following data:

{
  "id": string,
  "name": string,
  "icon": string,
  "owner": boolean,
  "permissions": string,
  "features": Array<string>
}

Upvotes: 2

Related Questions