diff --git a/src/plugins/holynotes/index.tsx b/src/plugins/holynotes/index.tsx index 882040e50..eded1c1a8 100644 --- a/src/plugins/holynotes/index.tsx +++ b/src/plugins/holynotes/index.tsx @@ -24,7 +24,8 @@ import { addButton, removeButton } from "@api/MessagePopover"; import { Devs } from "@utils/constants"; import { openModal } from "@utils/modal"; import definePlugin from "@utils/types"; -import { Menu } from "@webpack/common"; +import { ChannelStore, Menu } from "@webpack/common"; +import { Message } from "discord-types/general"; import { Popover as NoteButtonPopover } from "./components/icons/NoteButton"; import { NoteModal } from "./components/modals/Notebook"; @@ -33,10 +34,9 @@ import { DataStoreToCache } from "./utils"; const messageContextMenuPatch: NavContextMenuPatchCallback = async (children, { message }: { message: Message; }) => { children.push( - + {Object.keys(noteHandler.getAllNotes()).map((notebook: string, index: number) => ( noteHandler.addNote(message, notebook)} @@ -71,6 +71,8 @@ export default definePlugin({ return { label: "Save Note", icon: NoteButtonPopover, + message: message, + channel: ChannelStore.getChannel(message.channel_id), onClick: () => noteHandler.addNote(message, "Main") }; });