Skip to content
layz edited this page Nov 14, 2023 · 1 revision

Forms

Form function (module.inline.form, module.bot.form)

    async def form(
        self,
        *,
        text: str = 'Teagram',
        message: Message, 
        reply_markup: Union[InlineKeyboardMarkup, list, None] = None,
        callback: typing.Any = None,
        gif: typing.Any = None,
        photo: Photo = None,
        doc: Document = None,
        **kwargs
    ):

For example you have module and you want to use inline forms:

await self.inline.form(
    message=message,
    text="Example",
    reply_markup=[
        {"text": "Example button", "url": "t.me/UBteagram"} # reply markup must be list with dict buttons
    ]
)

There are many attributes in buttons such as callback, input, url and default attributes

Clone this wiki locally