Explorar o código

refactor: got rid of Discord deprecation warning

Kristian Vos %!s(int64=5) %!d(string=hai) anos
pai
achega
47c9f5bfe9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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(