diff --git a/src/Bot/Handlers/DiscordEventHandler.php b/src/Bot/Handlers/DiscordEventHandler.php index 9a6a4384a..8b8dcdd6b 100644 --- a/src/Bot/Handlers/DiscordEventHandler.php +++ b/src/Bot/Handlers/DiscordEventHandler.php @@ -343,7 +343,16 @@ public function onMessageUpdate(DiscordMessage $message, Discord $discord): void public function onMessageDelete(DiscordMessage|\stdClass $data, Discord $discord): void{ if($data instanceof DiscordMessage){ - $message = ModelConverter::genModelMessage($data); + if(!$this->checkMessage($data)){ + //Unknown message type deleted (send basic details TODO decide for future). + $message = [ + "message_id" => $data->id, + "channel_id" => $data->channel_id, + "server_id" => $data->guild_id + ]; + }else{ + $message = ModelConverter::genModelMessage($data); + } }else{ $message = [ "message_id" => $data->id,