mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-21 16:55:03 +00:00
Update backend/src/plugins/Starboard/util/removeMessageFromStarboard.ts
Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
parent
7855c49cd4
commit
0205dcc3ad
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ export async function removeMessageFromStarboard(
|
|||
const channel: Channel | undefined = pluginData.client.channels.cache.find(
|
||||
chan => chan.id === msg.starboard_channel_id,
|
||||
);
|
||||
if (!channel || (!(channel instanceof TextChannel) && !(channel instanceof NewsChannel))) return;
|
||||
if (!channel?.isText()) return;
|
||||
const message = await channel.messages.fetch(msg.starboard_message_id);
|
||||
if (!message || !message.deletable) return;
|
||||
await message.delete().catch(noop);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue