diff --git a/src/commands/mod/about.ts b/src/commands/mod/about.ts
index 7849dc6..3328d64 100644
--- a/src/commands/mod/about.ts
+++ b/src/commands/mod/about.ts
@@ -329,7 +329,10 @@
     return timedOut ? 0 : 1;
 }
 
-export const noteMenu = async (member: GuildMember, interaction: CommandInteraction | ContextMenuCommandInteraction): Promise<unknown> => {
+export const noteMenu = async (
+    member: GuildMember,
+    interaction: CommandInteraction | ContextMenuCommandInteraction
+): Promise<unknown> => {
     let m: Message;
     await interaction.reply({
         embeds: LoadingEmbed,
@@ -348,7 +351,7 @@
             blue: "#6576CC",
             purple: "#D46899",
             gray: "#C4C4C4"
-        }
+        };
         m = (await interaction.editReply({
             embeds: [
                 new EmojiEmbed()
@@ -410,7 +413,7 @@
                                 .setLabel("Gray")
                                 .setDefault(note?.flag === "gray")
                                 .setValue("gray")
-                                .setEmoji(getEmojiByName("ICONS.FLAGS.GRAY", "id")),
+                                .setEmoji(getEmojiByName("ICONS.FLAGS.GRAY", "id"))
                         )
                 ])
             ]
@@ -432,7 +435,6 @@
             continue;
         }
         if (i.isButton()) {
-
             if (i.customId === "modify") {
                 await i.showModal(
                     new Discord.ModalBuilder()
@@ -493,7 +495,7 @@
             await client.database.notes.flag(member.guild.id, member.id, flag as FlagColors | null);
         }
     }
-}
+};
 
 const callback = async (interaction: CommandInteraction): Promise<void> => {
     const member = interaction.options.getMember("user") as Discord.GuildMember;
diff --git a/src/commands/server/buttons.ts b/src/commands/server/buttons.ts
index f3c2abe..b98e821 100644
--- a/src/commands/server/buttons.ts
+++ b/src/commands/server/buttons.ts
@@ -265,7 +265,7 @@
                 case "send": {
                     await i.deferUpdate();
                     const channel = interaction.guild!.channels.cache.get(data.channel!) as Discord.TextChannel;
-                    let components: ActionRowBuilder<ButtonBuilder>[] = []
+                    let components: ActionRowBuilder<ButtonBuilder>[] = [];
                     let embeds: EmojiEmbed[] = [];
                     for (const button of data.buttons) {
                         components = [
@@ -282,9 +282,9 @@
                         if (data.title) e.setTitle(data.title);
                         if (data.description) e.setDescription(data.description);
                         if (data.color) e.setColor(data.color);
-                        embeds = [e]
+                        embeds = [e];
                     }
-                    await channel.send({ embeds, components })
+                    await channel.send({ embeds, components });
                     break;
                 }
             }
