From 76c4054acb6e6ed61890ae03a8aa6131892b5a40 Mon Sep 17 00:00:00 2001 From: Tobiah Date: Mon, 30 Mar 2020 12:26:26 -0500 Subject: [PATCH] fix(djs12): additional fixes for djs12, doc for control webhook --- README.md | 4 +++- src/settings/DatabaseQueries/BlacklistQueries.js | 2 +- src/settings/DatabaseQueries/SettingsQueries.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ba0c236dd..d0649e9f7 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ SHARDS | Total number of shards | 1 | 1 OWNER | ID of the person owning/running the bot, used for checking permissions PREFIX | Default prefix to use for the instance | `\` | `\` RAVEN_URL | DSN url for logging data to Sentry | `'https://***:***@sentry.io/***'` | N\A +CONTROL_WH_ID | Webhook id for the control webhook for system notifications | '0293485092348490834' | N\A +CONTROL_WH_TOKEN | Webhook token for the control webhook for system notifications | `asdpiofja[ospdj34095u8340wpodfj+_asdf-oja` |N\A ### Stats tracking Environment Variable | Description | Example | Default @@ -80,7 +82,7 @@ Environment Variable | Description | Example | Default EMBED_URL | Default link that embeds use in their title | `https://warframestat.us` | `https://warframestat.us` EMBED_ICON_URL | Default icon URL that embeds use in their footer | `https://warframestat.us/wfcd_logo_color.png` | `https://warframestat.us/wfcd_logo_color.png` BASE_PRES_MSG | Default presence message | `@Bot help` | `@Bot help` -BASE_PRES_ACT | Default presence activity | `WATCHING` | `PLAYING` +BASE_PRES_ACT | Default presence activity. Must be a valid discord.js value | `WATCHING` | `PLAYING` ### Feature Flags diff --git a/src/settings/DatabaseQueries/BlacklistQueries.js b/src/settings/DatabaseQueries/BlacklistQueries.js index 9a231a4be..95333a502 100644 --- a/src/settings/DatabaseQueries/BlacklistQueries.js +++ b/src/settings/DatabaseQueries/BlacklistQueries.js @@ -32,7 +32,7 @@ class BlacklistQueries { const res = await this.db.query(query); if (res[0]) { return res[0] - .map(result => this.bot.client.users.get(result.user_id)) + .map(result => this.bot.client.users.cache.get(result.user_id)) .filter(user => user); } return []; diff --git a/src/settings/DatabaseQueries/SettingsQueries.js b/src/settings/DatabaseQueries/SettingsQueries.js index 35d2e4340..ae0481930 100644 --- a/src/settings/DatabaseQueries/SettingsQueries.js +++ b/src/settings/DatabaseQueries/SettingsQueries.js @@ -158,7 +158,7 @@ class SettingsQueries { */ async deleteGuildSetting(guild, setting) { const promises = []; - guild.channels.forEach((channel) => { + guild.channels.cache.forEach((channel) => { promises.push(this.deleteChannelSetting(channel, setting)); }); return Promise.all(promises);