3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

i like to make people happy 4.0

Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
metal 2021-08-27 12:25:28 +01:00 committed by GitHub
parent 2671779714
commit 91e59ec3a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,9 +12,7 @@ export async function removeMessageFromStarboard(
await pluginData.state.starboardReactions.deleteAllStarboardReactionsForMessageId(msg.message_id).catch(noop);
// just re-do the deletion, i know this isnt clean but i dont care
const channel: Channel | undefined = pluginData.client.channels.cache.find(
chan => chan.id === msg.starboard_channel_id,
);
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);
if (!message?.deletable) return;