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'
}