mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-21 16:55:03 +00:00
fix imports & change comment
This commit is contained in:
parent
91e59ec3a4
commit
ece2a4575a
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue