diff --git a/src/events/messageEdit.ts b/src/events/messageEdit.ts
index f61a873..35de994 100644
--- a/src/events/messageEdit.ts
+++ b/src/events/messageEdit.ts
@@ -3,6 +3,7 @@
 import type Discord from "discord.js";
 import * as diff from "diff";
 import addPlural from "../utils/plurals.js";
+import { imageDataEasterEgg } from "../utils/defaults.js";
 
 export const event = "messageUpdate";
 
@@ -10,16 +11,8 @@
     if (newMessage.author.id === client.user!.id) return;
     if (newMessage.author.bot) return;
     if (!newMessage.guild) return;
-    const {
-        log,
-        isLogging,
-        NucleusColors,
-        entry,
-        renderUser,
-        renderDelta,
-        renderNumberDelta,
-        renderChannel
-    } = client.logger;
+    const { log, isLogging, NucleusColors, entry, renderUser, renderDelta, renderNumberDelta, renderChannel } =
+        client.logger;
     const replyTo: MessageReference | null = newMessage.reference;
     const newContent = newMessage.cleanContent.replaceAll("`", "‘");
     const oldContent = oldMessage.cleanContent.replaceAll("`", "‘");
@@ -72,14 +65,15 @@
         return;
     }
     const differences = diff.diffChars(oldContent, newContent);
-    const charsAdded = (differences.filter((d) => d.added).map((d) => d.count)).reduce((a, b) => a! + b!, 0)!;
-    const charsRemoved = (differences.filter((d) => d.removed).map((d) => d.count)).reduce((a, b) => a! + b!, 0)!;
-    const imageData = JSON.stringify({data: differences, extra: "The image in this embed contains data about the below log.\n" +
-                        "It isn't designed to be read by humans, but you can decode " +
-                        "it with any base64 decoder, and then read it as JSON.\n" +
-                        "We use base 64 to get around people using virus tests and the file being blocked, and an image to have the embed hidden (files can't be suppressed)\n" +
-                        "If you've got to this point and are reading this hidden message, you should come and work with us " +
-                        "at https://discord.gg/w35pXdrxKW (Internal development server) and let us know how you got here."}, null, 2)
+    const charsAdded = differences
+        .filter((d) => d.added)
+        .map((d) => d.count)
+        .reduce((a, b) => a! + b!, 0)!;
+    const charsRemoved = differences
+        .filter((d) => d.removed)
+        .map((d) => d.count)
+        .reduce((a, b) => a! + b!, 0)!;
+    const imageData = JSON.stringify({ data: differences, extra: imageDataEasterEgg }, null, 2);
     const data = {
         meta: {
             type: "messageUpdate",
@@ -88,7 +82,7 @@
             color: NucleusColors.yellow,
             emoji: "MESSAGE.EDIT",
             timestamp: newMessage.editedTimestamp,
-            buttons: [{ buttonText: "View Changes", buttonStyle: ButtonStyle.Secondary, buttonId: `log:edit` }],
+            buttons: [{ buttonText: "View Changes", buttonStyle: ButtonStyle.Secondary, buttonId: `log:message.edit` }],
             imageData: imageData
         },
         separate: {
