qeled / discordie

Predictable JavaScript abstractions for Discord API.
https://qeled.github.io/discordie/
BSD 2-Clause "Simplified" License
190 stars 45 forks source link

Get user email from IUser #68

Closed Arzte closed 7 years ago

Arzte commented 7 years ago

Discord's API looks like it should return a user's email from /users/{id} through the user object it returns, but this method doesn't exist in discordie, so I'm opening this issue to get that in.

abalabahaha commented 7 years ago

It only returns an email if you're requesting /users/@me or making an OAuth-based request with identify+email scopes

qeled commented 7 years ago

Endpoint /users/:id has never returned emails and likely never will. You need to explicitly request OAuth permissions from the user to fetch it through /users/@me with an OAuth token as said above.

This is beyond the scope of this library.