diff --git a/src/events/messageEdit.ts b/src/events/messageEdit.ts
index 37178a7..20624fe 100644
--- a/src/events/messageEdit.ts
+++ b/src/events/messageEdit.ts
@@ -1,10 +1,11 @@
 import type { NucleusClient } from "../utils/client.js";
 import type { Message, MessageReference } from "discord.js";
+import type Discord from "discord.js";
 
 export const event = "messageUpdate";
 
 export async function callback(client: NucleusClient, oldMessage: Message, newMessage: Message) {
-    if (newMessage.author.id === client.user.id) return;
+    if (newMessage.author.id === client.user!.id) return;
     if (!newMessage.guild) return;
     const { log, NucleusColors, entry, renderUser, renderDelta, renderNumberDelta, renderChannel } = client.logger;
     const replyTo: MessageReference | null = newMessage.reference;
@@ -17,8 +18,8 @@
     if (config) {
         attachmentJump = ` [[View attachments]](${config})`;
     }
-    if (newContent === oldContent) {
-        if (!oldMessage.flags.has("CROSSPOSTED") && newMessage.flags.has("CROSSPOSTED")) {
+    if (newContent === oldContent && newMessage.attachments.size === oldMessage.attachments.size) {
+        if (!replyTo) {
             const data = {
                 meta: {
                     type: "messageAnnounce",
@@ -34,14 +35,14 @@
                 list: {
                     messageId: entry(newMessage.id, `\`${newMessage.id}\``),
                     sentBy: entry(newMessage.author.id, renderUser(newMessage.author)),
-                    sentIn: entry(newMessage.channel.id, renderChannel(newMessage.channel)),
+                    sentIn: entry(newMessage.channel.id, renderChannel(newMessage.channel as Discord.GuildBasedChannel)),
                     sent: entry(
-                        new Date(newMessage.createdTimestamp),
-                        renderDelta(new Date(newMessage.createdTimestamp))
+                        newMessage.createdTimestamp,
+                        renderDelta(newMessage.createdTimestamp)
                     ),
                     published: entry(
-                        new Date(newMessage.editedTimestamp!),
-                        renderDelta(new Date(newMessage.editedTimestamp!))
+                        newMessage.editedTimestamp!,
+                        renderDelta(newMessage.editedTimestamp!)
                     ),
                     mentions: renderNumberDelta(oldMessage.mentions.users.size, newMessage.mentions.users.size),
                     attachments: entry(
@@ -81,16 +82,16 @@
         list: {
             messageId: entry(newMessage.id, `\`${newMessage.id}\``),
             sentBy: entry(newMessage.author.id, renderUser(newMessage.author)),
-            sentIn: entry(newMessage.channel.id, renderChannel(newMessage.channel)),
-            sent: entry(new Date(newMessage.createdTimestamp), renderDelta(new Date(newMessage.createdTimestamp))),
-            edited: entry(new Date(newMessage.editedTimestamp), renderDelta(new Date(newMessage.editedTimestamp))),
+            sentIn: entry(newMessage.channel.id, renderChannel(newMessage.channel as Discord.GuildBasedChannel)),
+            sent: entry(newMessage.createdTimestamp, renderDelta(newMessage.createdTimestamp)),
+            edited: entry(newMessage.editedTimestamp, renderDelta(newMessage.editedTimestamp)),
             mentions: renderNumberDelta(oldMessage.mentions.users.size, newMessage.mentions.users.size),
             attachments: entry(
                 renderNumberDelta(oldMessage.attachments.size, newMessage.attachments.size),
                 renderNumberDelta(oldMessage.attachments.size, newMessage.attachments.size) + attachmentJump
             ),
             repliedTo: entry(
-                replyTo,
+                replyTo ? replyTo.messageId! : null,
                 replyTo
                     ? `[[Jump to message]](https://discord.com/channels/${newMessage.guild.id}/${newMessage.channel.id}/${replyTo.messageId})`
                     : "None"
