-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Creating Plugins
Devesh Pal edited this page Jul 18, 2022
·
1 revision
You can import most of things that you may need while creating plugins from init file of the folder (either addons
or plugins
)
from . import *
ultroid_cmd is the decorator used for handling message update (that is commands or relevant).
ultroid_cmd
do most of the work like managing handlers for dual/bot/user mode or even manager.
@ultroid_cmd(pattern="hello")
async def handler(event):
await event.eor("Hello World!")
-
in_pattern
is the decorator used for Inline Assistant Updates.
@in_pattern("hi")
async def inline(event):
await event.answer(
[
await event.builder.article(title="Hello", text="Hello from Inline...")
]
)
-
@callback
is used for Callback events.
@callback("query")
async def _(ult):
await ult.answer("How are you?")