Browse Source

Disable a few unused websocket events

Hopefully will improve memory usage somewhat
master
benji7425 3 years ago
parent
commit
614bdab462
2 changed files with 11 additions and 1 deletions
  1. 3
      discord-bot-core/Client.js
  2. 9
      discord-bot-core/internal-config.json

3
discord-bot-core/Client.js

@ -18,7 +18,8 @@ module.exports = class Client extends Discord.Client {
*/
constructor(token, commandsDir, guildDataModel) {
super({
messageCacheMaxSize: 16
messageCacheMaxSize: 16,
disabledEvents: InternalConfig.disabledEvents
});
this._token = token;

9
discord-bot-core/internal-config.json

@ -8,5 +8,14 @@
"[ws] [connection] Sending a heartbeat",
"[ws] [connection] Heartbeat acknowledged"
],
"disabledEvents": [
"CHANNEL_PINS_UPDATE",
"GUILD_BAN_ADD",
"GUILD_BAN_REMOVE",
"PRESENCE_UPDATE",
"TYPING_START",
"USER_NOTE_UPDATE",
"USER_SETTINGS_UPDATE"
],
"askTimeout": 60000
}
Loading…
Cancel
Save