How to Retrieve a Discord User's Email with a Bot?

I have developed a Discord bot that requires access to a user’s email for a specific function. Despite updating the OAuth scope to include email, the user object I receive still lacks the email property. Below is my authorization URL:

https://discord.com/oauth2/authorize?client_id=123456789&scope=email%20bot&permissions=268435506

Additionally, here’s my testing function:

bot.on("message", (message) => {
    console.log(message.member.user);
});

As you can see in the output, the user object does not include an email property.

user {
  id: '652349438404198401',
  system: null,
  locale: null,
  flags: UserFlags { bitfield: 0 },
  username: 'Geek_.0',
  bot: false,
  discriminator: '8104',
  avatar: 'acba52ce51c54dacbcb2cba257c724af',
  lastMessageID: '812447507249889300',
  lastMessageChannelID: '809526161964531766'
}

oAuth in Discord doesn’t support getting emails directly with just bot premission. you must use a web server to handle the OAuth2 and get user data that way. Make sure consent screen showns about email access to users. Hope this helps!

The key part you might be missing is that email addresses are confidential information, and Discord ensures strict access to them. Even if you’ve added email to your OAuth scopes, you’ll need to ensure that your application asks for this scope via a web authorization flow, not just when using bot permissions. Without an active web-based authorization consent from the user to share their email address, Discord will not provide it. Integrate a web interface to complete this part of the OAuth2 process.