diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts
index 62e9609..a22045b 100644
--- a/src/events/interactionCreate.ts
+++ b/src/events/interactionCreate.ts
@@ -5,7 +5,9 @@
 import createTranscript from "../premium/createTranscript.js";
 
 import type { Interaction } from "discord.js";
+import type Discord from "discord.js";
 import type { NucleusClient } from "../utils/client.js";
+import EmojiEmbed from "../utils/generateEmojiEmbed.js";
 
 export const event = "interactionCreate";
 
@@ -18,20 +20,29 @@
             case "createticket":     { return await create(interaction); }
             case "closeticket":      { return await close(interaction); }
             case "createtranscript": { return await createTranscript(interaction); }
+            case "suggestionAccept": { return await modifySuggestion(interaction, true); }
+            case "suggestionDeny":   { return await modifySuggestion(interaction, false); }
         }
-    // } else if (interaction.type === "APPLICATION_COMMAND_AUTOCOMPLETE") {
-    //     const int = interaction as AutocompleteInteraction;
-    //     switch (`${int.commandName} ${int.options.getSubcommandGroup(false)} ${int.options.getSubcommand(false)}`) {
-    //         case "settings null stats": {
-    //             return int.respond(generateStatsChannelAutocomplete(int.options.getString("name") ?? ""));
-    //         }
-    //         case "settings null welcome": {
-    //             return int.respond(generateWelcomeMessageAutocomplete(int.options.getString("message") ?? ""));
-    //         }
-    //     }
     }
 }
 
+async function modifySuggestion(interaction: Discord.MessageComponentInteraction, accept: boolean) {
+    const message = await interaction.message;
+    await message.fetch();
+    if (message.embeds.length === 0) return;
+    const embed = message.embeds[0];
+    const newColour = accept ? "Success" : "Danger";
+    const footer = {text: `Suggestion ${accept ? "accepted" : "denied"} by ${interaction.user.tag}`, iconURL: interaction.user.displayAvatarURL()};
+
+    const newEmbed = new EmojiEmbed()
+        .setTitle(embed!.title!)
+        .setDescription(embed!.description!)
+        .setFooter(footer)
+        .setStatus(newColour);
+
+    await interaction.update({embeds: [newEmbed], components: []});
+}
+
 export async function callback(_client: NucleusClient, interaction: Interaction) {
     await interactionCreate(interaction);
 }
