Prechádzať zdrojové kódy

refactor: got rid of Discord deprecation warning

Kristian Vos 5 rokov pred
rodič
commit
47c9f5bfe9
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      backend/logic/discord.js

+ 1 - 1
backend/logic/discord.js

@@ -50,7 +50,7 @@ module.exports = class extends coreClass {
 	async sendAdminAlertMessage(message, color, type, critical, extraFields) {
 		try { await this._validateHook(); } catch { return; }
 
-		const channel = this.client.channels.find("id", this.adminAlertChannelId);
+		const channel = this.client.channels.find(channel => channel.id === this.adminAlertChannelId);
 		if (channel !== null) {
 			let richEmbed = new Discord.RichEmbed();
 			richEmbed.setAuthor(