Bound Methods

Some Pyrogram types define what are called bound methods. Bound methods are functions attached to a class which are accessed via an instance of that class. They make it even easier to call specific methods by automatically inferring some of the required arguments.

from pyrogram import Client

app = Client("my_account")


@app.on_message()
def hello(client, message)
    message.reply("hi")


app.run()

InlineQuery