from pyrogram.types import Story from userbot.modules.client import PyroClient from userbot.modules.stories.service import save_story @PyroClient.on_story() async def on_story(client: PyroClient, story: Story) -> None: if client.capture is None: return await save_story(client, client.capture, story) handlers = on_story.handlers