diff --git a/CHANGELOG.md b/CHANGELOG.md index 90a56ab..8393046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ Please report any bugs you encounter by [creating a GitHub issue](https://github **General changes:** * Added support for Node.js 14, dropped support for Node.js 10 and 11 * The supported versions are now 12, 13, and 14 +* The bot now requests the necessary [Gateway Intents](https://discord.com/developers/docs/topics/gateway#gateway-intents) + * **This includes the privileged "Server Members Intent"**, which is used for server greetings/welcome messages. + This means that **you need to enable "Server Members Intent"** on the bot's page on the Discord Developer Portal. * Added support for editing and deleting staff replies * This is **enabled by default** * This can be disabled with the `allowStaffEdit` and `allowStaffDelete` options @@ -38,7 +41,6 @@ Please report any bugs you encounter by [creating a GitHub issue](https://github **Internal/technical updates:** * Updated Eris to v0.13.3 * Updated several other dependencies -* The client now requests specific gateway intents on connection * New JSON Schema based config parser that validates each option and their types more strictly to prevent undefined behavior ## v2.31.0-beta.0 diff --git a/src/bot.js b/src/bot.js index 82ef37e..666869a 100644 --- a/src/bot.js +++ b/src/bot.js @@ -2,6 +2,10 @@ const Eris = require("eris"); const config = require("./cfg"); const intents = [ + // PRIVILEGED INTENTS + "guildMembers", // For server greetings + + // REGULAR INTENTS "directMessages", // For core functionality "guildMessages", // For bot commands and mentions "guilds", // For core functionality @@ -9,7 +13,8 @@ const intents = [ "guildMessageTyping", // For typing indicators "directMessageTyping", // For typing indicators - ...config.extraIntents, // Any extra intents added to the config + // EXTRA INTENTS (from the config) + ...config.extraIntents, ]; const bot = new Eris.Client(config.token, {