From d0fb8b657f4d6649387a830f968a347d4ed8ceaf Mon Sep 17 00:00:00 2001 From: pakkographic <41129374+pakkographic@users.noreply.github.com> Date: Sun, 30 Jun 2024 19:01:47 +0200 Subject: [PATCH] Fix potential crash when deleting message from an unknown channel type --- lib/gateway/events/MessageHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gateway/events/MessageHandler.ts b/lib/gateway/events/MessageHandler.ts index 50e2d32..3815aa4 100644 --- a/lib/gateway/events/MessageHandler.ts +++ b/lib/gateway/events/MessageHandler.ts @@ -52,7 +52,7 @@ export class MessageHandler extends GatewayEventHandler { else void this.addGuildChannel(data.serverId, data.message.channelId); const channel = this.client.getChannel(data.serverId, data.message.channelId); - const PU_Message = channel?.messages.update(data.message) ?? { + const PU_Message = channel?.messages?.update(data.message) ?? { id: data.message.id, guildID: data.serverId, channelID: data.message.channelId,