added flags and fixed user context menus
diff --git a/src/commands/mod/about.ts b/src/commands/mod/about.ts
index fc656ff..7849dc6 100644
--- a/src/commands/mod/about.ts
+++ b/src/commands/mod/about.ts
@@ -1,5 +1,5 @@
 import { LoadingEmbed } from "../../utils/defaults.js";
-import type { HistorySchema } from "../../utils/database.js";
+import type { HistorySchema, FlagColors } from "../../utils/database.js";
 import Discord, {
     CommandInteraction,
     GuildMember,
@@ -10,7 +10,10 @@
     ButtonStyle,
     TextInputStyle,
     APIMessageComponentEmoji,
-    SlashCommandSubcommandBuilder
+    SlashCommandSubcommandBuilder,
+    StringSelectMenuBuilder,
+    StringSelectMenuOptionBuilder,
+    ContextMenuCommandInteraction
 } from "discord.js";
 import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
 import getEmojiByName from "../../utils/getEmojiByName.js";
@@ -326,35 +329,38 @@
     return timedOut ? 0 : 1;
 }
 
-const callback = async (interaction: CommandInteraction): Promise<unknown> => {
+export const noteMenu = async (member: GuildMember, interaction: CommandInteraction | ContextMenuCommandInteraction): Promise<unknown> => {
     let m: Message;
-    const member = interaction.options.getMember("user") as Discord.GuildMember;
     await interaction.reply({
         embeds: LoadingEmbed,
         ephemeral: true,
         fetchReply: true
     });
     let note;
-    let firstLoad = true;
     let timedOut = false;
     while (!timedOut) {
         note = await client.database.notes.read(member.guild.id, member.id);
-        if (firstLoad && !note) {
-            await showHistory(member, interaction);
+        const colors: Record<string, Discord.ColorResolvable> = {
+            none: "#424242",
+            red: "#F27878",
+            yellow: "#EDC575",
+            green: "#68D49E",
+            blue: "#6576CC",
+            purple: "#D46899",
+            gray: "#C4C4C4"
         }
-        firstLoad = false;
         m = (await interaction.editReply({
             embeds: [
                 new EmojiEmbed()
-                    .setEmoji("MEMBER.JOIN")
+                    .setEmoji(`ICONS.FLAGS.${(note?.flag ?? "none").toUpperCase()}`)
                     .setTitle("Mod notes for " + member.user.username)
-                    .setDescription(note ? note : "*No note set*")
-                    .setStatus("Success")
+                    .setDescription(note?.note ? note.note : "*No note set*")
+                    .setColor(colors[note?.flag ?? "none"]!)
             ],
             components: [
                 new ActionRowBuilder<Discord.ButtonBuilder>().addComponents([
                     new ButtonBuilder()
-                        .setLabel(`${note ? "Modify" : "Create"} note`)
+                        .setLabel(`${note?.note ? "Modify" : "Create"} note`)
                         .setStyle(ButtonStyle.Primary)
                         .setCustomId("modify")
                         .setEmoji(getEmojiByName("ICONS.EDIT", "id")),
@@ -363,6 +369,49 @@
                         .setStyle(ButtonStyle.Primary)
                         .setCustomId("history")
                         .setEmoji(getEmojiByName("ICONS.HISTORY", "id"))
+                ]),
+                new ActionRowBuilder<Discord.StringSelectMenuBuilder>().addComponents([
+                    new StringSelectMenuBuilder()
+                        .setCustomId("flag")
+                        .setPlaceholder("Select a flag")
+                        .addOptions(
+                            new StringSelectMenuOptionBuilder()
+                                .setLabel("None")
+                                .setDefault(!note?.flag)
+                                .setValue("none")
+                                .setDescription("Clear")
+                                .setEmoji(getEmojiByName("ICONS.FLAGS.NONE", "id")),
+                            new StringSelectMenuOptionBuilder()
+                                .setLabel("Red")
+                                .setDefault(note?.flag === "red")
+                                .setValue("red")
+                                .setEmoji(getEmojiByName("ICONS.FLAGS.RED", "id")),
+                            new StringSelectMenuOptionBuilder()
+                                .setLabel("Yellow")
+                                .setDefault(note?.flag === "yellow")
+                                .setValue("yellow")
+                                .setEmoji(getEmojiByName("ICONS.FLAGS.YELLOW", "id")),
+                            new StringSelectMenuOptionBuilder()
+                                .setLabel("Green")
+                                .setDefault(note?.flag === "green")
+                                .setValue("green")
+                                .setEmoji(getEmojiByName("ICONS.FLAGS.GREEN", "id")),
+                            new StringSelectMenuOptionBuilder()
+                                .setLabel("Blue")
+                                .setDefault(note?.flag === "blue")
+                                .setValue("blue")
+                                .setEmoji(getEmojiByName("ICONS.FLAGS.BLUE", "id")),
+                            new StringSelectMenuOptionBuilder()
+                                .setLabel("Purple")
+                                .setDefault(note?.flag === "purple")
+                                .setValue("purple")
+                                .setEmoji(getEmojiByName("ICONS.FLAGS.PURPLE", "id")),
+                            new StringSelectMenuOptionBuilder()
+                                .setLabel("Gray")
+                                .setDefault(note?.flag === "gray")
+                                .setValue("gray")
+                                .setEmoji(getEmojiByName("ICONS.FLAGS.GRAY", "id")),
+                        )
                 ])
             ]
         })) as Message;
@@ -382,60 +431,73 @@
             timedOut = true;
             continue;
         }
-        if (i.customId === "modify") {
-            await i.showModal(
-                new Discord.ModalBuilder()
-                    .setCustomId("modal")
-                    .setTitle("Editing moderator note")
-                    .addComponents(
-                        new ActionRowBuilder<Discord.TextInputBuilder>().addComponents(
-                            new Discord.TextInputBuilder()
-                                .setCustomId("note")
-                                .setLabel("Note")
-                                .setMaxLength(4000)
-                                .setRequired(false)
-                                .setStyle(TextInputStyle.Paragraph)
-                                .setValue(note ? note : " ")
+        if (i.isButton()) {
+
+            if (i.customId === "modify") {
+                await i.showModal(
+                    new Discord.ModalBuilder()
+                        .setCustomId("modal")
+                        .setTitle("Editing moderator note")
+                        .addComponents(
+                            new ActionRowBuilder<Discord.TextInputBuilder>().addComponents(
+                                new Discord.TextInputBuilder()
+                                    .setCustomId("note")
+                                    .setLabel("Note")
+                                    .setMaxLength(4000)
+                                    .setRequired(false)
+                                    .setStyle(TextInputStyle.Paragraph)
+                                    .setValue(note?.note ? note.note : " ")
+                            )
                         )
-                    )
-            );
-            await interaction.editReply({
-                embeds: [
-                    new EmojiEmbed()
-                        .setTitle("Mod notes for " + member.user.username)
-                        .setDescription("Modal opened. If you can't see it, click back and try again.")
-                        .setStatus("Success")
-                        .setEmoji("GUILD.TICKET.OPEN")
-                ],
-                components: [
-                    new ActionRowBuilder<Discord.ButtonBuilder>().addComponents([
-                        new ButtonBuilder()
-                            .setLabel("Back")
-                            .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
-                            .setStyle(ButtonStyle.Primary)
-                            .setCustomId("back")
-                    ])
-                ]
-            });
-            let out;
-            try {
-                out = await modalInteractionCollector(m, interaction.user);
-            } catch (e) {
-                timedOut = true;
-                continue;
+                );
+                await interaction.editReply({
+                    embeds: [
+                        new EmojiEmbed()
+                            .setTitle("Mod notes for " + member.user.username)
+                            .setDescription("Modal opened. If you can't see it, click back and try again.")
+                            .setStatus("Success")
+                            .setEmoji("GUILD.TICKET.OPEN")
+                    ],
+                    components: [
+                        new ActionRowBuilder<Discord.ButtonBuilder>().addComponents([
+                            new ButtonBuilder()
+                                .setLabel("Back")
+                                .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
+                                .setStyle(ButtonStyle.Primary)
+                                .setCustomId("back")
+                        ])
+                    ]
+                });
+                let out;
+                try {
+                    out = await modalInteractionCollector(m, interaction.user);
+                } catch (e) {
+                    timedOut = true;
+                    continue;
+                }
+                if (out === null || out.isButton()) {
+                    continue;
+                } else {
+                    let toAdd = out.fields.getTextInputValue("note").trim() || null;
+                    if (toAdd === "") toAdd = null;
+                    await client.database.notes.create(member.guild.id, member.id, toAdd);
+                }
+            } else if (i.customId === "history") {
+                await i.deferUpdate();
+                if (!(await showHistory(member, interaction))) return;
             }
-            if (out === null || out.isButton()) {
-                continue;
-            } else {
-                let toAdd = out.fields.getTextInputValue("note").trim() || null;
-                if (toAdd === "") toAdd = null;
-                await client.database.notes.create(member.guild.id, member.id, toAdd);
-            }
-        } else if (i.customId === "history") {
+        } else if (i.isStringSelectMenu()) {
             await i.deferUpdate();
-            if (!(await showHistory(member, interaction))) return;
+            let flag: string | null = i.values[0]!;
+            if (flag === "none") flag = null;
+            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;
+    await noteMenu(member, interaction);
 };
 
 const check = (interaction: CommandInteraction) => {
diff --git a/src/config/emojis.ts b/src/config/emojis.ts
index b7ed91a..b04c569 100644
--- a/src/config/emojis.ts
+++ b/src/config/emojis.ts
@@ -51,6 +51,7 @@
             CATEGORY: "1064943289708597348"
         },
         FLAGS: {
+            NONE: "1099782406417940520",
             RED: "1082719687219101800",
             YELLOW: "1082719684060794890",
             GREEN: "1082719681326108763",
diff --git a/src/context/users/flaguser.ts b/src/context/users/flaguser.ts
new file mode 100644
index 0000000..958274f
--- /dev/null
+++ b/src/context/users/flaguser.ts
@@ -0,0 +1,17 @@
+import { ContextMenuCommandBuilder, GuildMember, PermissionFlagsBits, UserContextMenuCommandInteraction } from "discord.js";
+import { noteMenu } from "../../commands/mod/about.js";
+
+const command = new ContextMenuCommandBuilder().setName("Flag User").setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages);
+
+const callback = async (interaction: UserContextMenuCommandInteraction) => {
+    const guild = interaction.guild!;
+    let member = interaction.targetMember as GuildMember | null;
+    if (!member) member = await guild.members.fetch(interaction.targetId);
+    await noteMenu(member, interaction);
+};
+
+const check = async (_interaction: UserContextMenuCommandInteraction) => {
+    return true;
+};
+
+export { command, callback, check };
diff --git a/src/context/users/userinfo.ts b/src/context/users/userinfo.ts
index b215685..e6af836 100644
--- a/src/context/users/userinfo.ts
+++ b/src/context/users/userinfo.ts
@@ -4,13 +4,10 @@
 const command = new ContextMenuCommandBuilder().setName("User info");
 
 const callback = async (interaction: UserContextMenuCommandInteraction) => {
-    try {
-        console.log("getting user info")
-        const guild = interaction.guild!;
-        let member = interaction.targetMember as GuildMember | null;
-        if (!member) member = await guild.members.fetch(interaction.targetId);
-        await userAbout(guild, member as GuildMember, interaction);
-    } catch (e) { console.log(e) }
+    const guild = interaction.guild!;
+    let member = interaction.targetMember as GuildMember | null;
+    if (!member) member = await guild.members.fetch(interaction.targetId);
+    await userAbout(guild, member as GuildMember, interaction);
 };
 
 const check = async (_interaction: UserContextMenuCommandInteraction) => {
diff --git a/src/utils/commandRegistration/register.ts b/src/utils/commandRegistration/register.ts
index 6b7c225..5889d54 100644
--- a/src/utils/commandRegistration/register.ts
+++ b/src/utils/commandRegistration/register.ts
@@ -187,15 +187,11 @@
     client.on("interactionCreate", async (interaction: Interaction) => {
         if (interaction.isUserContextMenuCommand()) {
             const commandName = "contextCommands/user/" + interaction.commandName;
-            console.log("trying " + commandName)
-            try {
-                console.log(client.commands[commandName])
-                await execute(
-                    client.commands[commandName]![0]?.check,
-                    client.commands[commandName]![0]?.callback,
-                    interaction
-                );
-            } catch (e) { console.log(e) }
+            await execute(
+                client.commands[commandName]![0]?.check,
+                client.commands[commandName]![0]?.callback,
+                interaction
+            );
             return;
         } else if (interaction.isMessageContextMenuCommand()) {
             const commandName = "contextCommands/message/" + interaction.commandName;
diff --git a/src/utils/database.ts b/src/utils/database.ts
index dd768a3..77ff875 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -696,18 +696,25 @@
         this.modNotes = database.collection<ModNoteSchema>("modNotes");
     }
 
+    async flag(guild: string, user: string, flag: FlagColors | null) {
+        const modNote = await this.modNotes.findOne({ guild: guild, user: user });
+        modNote
+            ? await this.modNotes.updateOne({ guild: guild, user: user }, { $set: { flag: flag } }, collectionOptions)
+            : await this.modNotes.insertOne({ guild: guild, user: user, note: null, flag: flag }, collectionOptions);
+    }
+
     async create(guild: string, user: string, note: string | null) {
         // console.log("ModNotes create");
         const modNote = await this.modNotes.findOne({ guild: guild, user: user });
         modNote
             ? await this.modNotes.updateOne({ guild: guild, user: user }, { $set: { note: note } }, collectionOptions)
-            : await this.modNotes.insertOne({ guild: guild, user: user, note: note }, collectionOptions);
+            : await this.modNotes.insertOne({ guild: guild, user: user, note: note, flag: null }, collectionOptions);
     }
 
     async read(guild: string, user: string) {
         // console.log("ModNotes read");
         const entry = await this.modNotes.findOne({ guild: guild, user: user });
-        return entry?.note ?? null;
+        return entry ?? null;
     }
 
     async delete(guild: string) {
@@ -1036,10 +1043,13 @@
     amount: string | null;
 }
 
+export type FlagColors = "red" | "yellow" | "green" | "blue" | "purple" | "gray";
+
 export interface ModNoteSchema {
     guild: string;
     user: string;
     note: string | null;
+    flag: FlagColors | null;
 }
 
 export interface PremiumSchema {