Request GUILD_MEMBERS intent for server greetings. Emphasize new intent requirement in the changelog.

cshd
Dragory 2020-08-17 01:24:30 +03:00
parent 4fbf2a1769
commit ac2548b6cc
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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, {