diff --git a/src/commands/server/buttons.ts b/src/commands/server/buttons.ts
index c89e481..f07f3ce 100644
--- a/src/commands/server/buttons.ts
+++ b/src/commands/server/buttons.ts
@@ -70,7 +70,7 @@
         buttons: ["createticket"],
         color: "RED"
     }
-]
+];
 
 export const callback = async (interaction: CommandInteraction): Promise<void> => {
     const m = await interaction.reply({
@@ -128,10 +128,10 @@
                             .setLabel(preset.title)
                             .setValue(i.toString())
                             .setDescription(preset.description)
-                            .setEmoji(getEmojiByName("COLORS." + preset.color, "id") as APIMessageComponentEmoji)
+                            .setEmoji(getEmojiByName("COLORS." + preset.color, "id") as APIMessageComponentEmoji);
                     })
                 )
-        )
+        );
 
         const buttonSelect = new ActionRowBuilder<StringSelectMenuBuilder>().addComponents(
             new StringSelectMenuBuilder()
@@ -297,7 +297,7 @@
             switch (i.customId) {
                 case "preset": {
                     const chosen = presetButtons[parseInt(i.values[0]!)]!;
-                    const newColor = colors[chosen.color!]!
+                    const newColor = colors[chosen.color!]!;
                     data = _.assign(data, chosen, { color: newColor });
                     break;
                 }
diff --git a/src/commands/settings/tracks.ts b/src/commands/settings/tracks.ts
index c81eeed..b79f54d 100644
--- a/src/commands/settings/tracks.ts
+++ b/src/commands/settings/tracks.ts
@@ -471,10 +471,10 @@
                 case "add": {
                     const newPage = await editTrack(i, m, roles);
                     if (_.isEqual(newPage, defaultTrackData)) break;
-                    if(!newPage) break;
-                    console.log(newPage)
+                    if (!newPage) break;
+                    console.log(newPage);
                     tracks.push(newPage);
-                    console.log(tracks)
+                    console.log(tracks);
                     page = tracks.length - 1;
                     break;
                 }
diff --git a/src/commands/user/track.ts b/src/commands/user/track.ts
index 92553ff..1ce05ee 100644
--- a/src/commands/user/track.ts
+++ b/src/commands/user/track.ts
@@ -98,7 +98,11 @@
             } roles from this track. `;
             conflictDropdown = [];
             const yourRoles = guild.members.cache.get(interaction.user.id)!.roles;
-            if ((roles.get(selected[0]!)!.position < yourRoles.highest.position && roles.get(selected[0]!)!.position < guild.members.me!.roles.highest.position!) || managed) {
+            if (
+                (roles.get(selected[0]!)!.position < yourRoles.highest.position &&
+                    roles.get(selected[0]!)!.position < guild.members.me!.roles.highest.position!) ||
+                managed
+            ) {
                 generated +=
                     "In order to promote or demote this user, you must select which role the member should keep.";
                 selected.forEach((role) => {
@@ -116,12 +120,12 @@
                         .setPlaceholder("Select a role to keep")
                 ];
             } else {
-                if(roles.get(selected[0]!)!.position >= yourRoles.highest.position) {
+                if (roles.get(selected[0]!)!.position >= yourRoles.highest.position) {
                     generated +=
                         "You don't have permission to manage one or more of the user's roles, and therefore can't select one to keep.";
                 } else {
                     generated +=
-                        "I don't have permission to manage one or more of the user's roles, and therefore can't select one to keep."
+                        "I don't have permission to manage one or more of the user's roles, and therefore can't select one to keep.";
                 }
             }
         } else {
