diff --git a/anjani/plugins/notes.py b/anjani/plugins/notes.py index 8d61447f2..216b90919 100644 --- a/anjani/plugins/notes.py +++ b/anjani/plugins/notes.py @@ -80,7 +80,8 @@ async def on_plugin_restore(self, chat_id: int, data: MutableMapping[str, Any]) @listener.filters(filters.regex(r"^#[\w\-]+(?!\n)$")) async def on_message(self, message: Message) -> None: """Notes hashtag trigger.""" - return await self.get_note(message, message.text.lstrip("#")) + trigger = message.text or message.caption + return await self.get_note(message, trigger.lstrip("#")) async def get_note(self, message: Message, name: str, noformat: bool = False) -> None: """Get note data and send based on types."""