From ece2a4575af0357f1f414a8f950c512cc754d438 Mon Sep 17 00:00:00 2001 From: metal Date: Fri, 27 Aug 2021 11:26:40 +0000 Subject: [PATCH] fix imports & change comment --- .../src/plugins/Starboard/util/removeMessageFromStarboard.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/plugins/Starboard/util/removeMessageFromStarboard.ts b/backend/src/plugins/Starboard/util/removeMessageFromStarboard.ts index ae20adb1..f4635371 100644 --- a/backend/src/plugins/Starboard/util/removeMessageFromStarboard.ts +++ b/backend/src/plugins/Starboard/util/removeMessageFromStarboard.ts @@ -1,4 +1,3 @@ -import { BaseGuildTextChannel, Channel, GuildChannel, NewsChannel, TextChannel } from "discord.js"; import { GuildPluginData } from "knub"; import { StarboardMessage } from "../../../data/entities/StarboardMessage"; import { noop } from "../../../utils"; @@ -11,7 +10,7 @@ export async function removeMessageFromStarboard( // fixes stuck entries on starboard_reactions table after messages being deleted, probably should add a cleanup script for this as well, i.e. DELETE FROM starboard_reactions WHERE message_id NOT IN (SELECT id FROM starboard_messages) await pluginData.state.starboardReactions.deleteAllStarboardReactionsForMessageId(msg.message_id).catch(noop); - // just re-do the deletion, i know this isnt clean but i dont care + // this code is now Almeida-certified and no longer ugly :ok_hand: :cake: const channel = pluginData.client.channels.cache.find(c => c.id === msg.starboard_channel_id); if (!channel?.isText()) return; const message = await channel.messages.fetch(msg.starboard_message_id).catch(noop);