Sitelet https://web.archive.org/web/20211110112950/https://docs.pyrogram.org/api/bound-methods/
Logo
version:

Introduction

  • Quick Start
  • Install Guide
  • Project Setup

Getting Started

  • Authorization
  • Calling Methods
  • Handling Updates
  • Error Handling
  • Examples

API Reference

  • Pyrogram Client
  • Available Methods
  • Available Types
  • Bound Methods
    • Message
      • click
      • delete
      • download
      • forward
      • copy
      • pin
      • unpin
      • edit
      • edit_text
      • edit_caption
      • edit_media
      • edit_reply_markup
      • reply
      • reply_text
      • reply_animation
      • reply_audio
      • reply_cached_media
      • reply_chat_action
      • reply_contact
      • reply_document
      • reply_game
      • reply_inline_bot_result
      • reply_location
      • reply_media_group
      • reply_photo
      • reply_poll
      • reply_sticker
      • reply_venue
      • reply_video
      • reply_video_note
      • reply_voice
      • get_media_group
    • Chat
      • archive
      • unarchive
      • set_title
      • set_description
      • set_photo
      • kick_member
      • unban_member
      • restrict_member
      • promote_member
      • get_member
      • get_members
      • iter_members
      • add_members
      • join
      • leave
      • mark_unread
    • User
      • archive
      • unarchive
      • block
      • unblock
    • CallbackQuery
      • answer
      • edit_message_text
      • edit_message_caption
      • edit_message_media
      • edit_message_reply_markup
    • InlineQuery
      • answer
  • Update Handlers
  • Decorators
  • RPC Errors
  • Update Filters

Topic Guides

  • Using Filters
  • Creating Filters
  • More on Updates
  • Configuration File
  • Smart Plugins
  • Session Settings
  • Fast Crypto
  • Storage Engines
  • Text Formatting
  • Object Serialization
  • SOCKS5 Proxy
  • Scheduling Tasks
  • Bots Interaction
  • MTProto vs. Bot API
  • Debugging
  • Test Servers
  • Advanced Usage
  • Voice Calls

Meta

  • Pyrogram FAQ
  • Pyrogram Glossary
  • Support Pyrogram
  • About the License
  • Release Notes

Telegram API

  • Raw Functions
  • Raw Types
  • Raw Base
Pyrogram
  • Docs »
  • Bound Methods
  • View on GitHub

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_text("hi")


app.run()

Contents

  • Message

  • Chat

  • User

  • CallbackQuery

  • InlineQuery


Message¶

  • click()

  • delete()

  • download()

  • forward()

  • copy()

  • pin()

  • unpin()

  • edit()

  • edit_text()

  • edit_caption()

  • edit_media()

  • edit_reply_markup()

  • reply()

  • reply_text()

  • reply_animation()

  • reply_audio()

  • reply_cached_media()

  • reply_chat_action()

  • reply_contact()

  • reply_document()

  • reply_game()

  • reply_inline_bot_result()

  • reply_location()

  • reply_media_group()

  • reply_photo()

  • reply_poll()

  • reply_sticker()

  • reply_venue()

  • reply_video()

  • reply_video_note()

  • reply_voice()

  • get_media_group()

Chat¶

  • archive()

  • unarchive()

  • set_title()

  • set_description()

  • set_photo()

  • kick_member()

  • unban_member()

  • restrict_member()

  • promote_member()

  • get_member()

  • get_members()

  • iter_members()

  • add_members()

  • join()

  • leave()

  • mark_unread()

User¶

  • archive()

  • unarchive()

  • block()

  • unblock()

CallbackQuery¶

  • answer()

  • edit_message_text()

  • edit_message_caption()

  • edit_message_media()

  • edit_message_reply_markup()

InlineQuery¶

  • answer()

Next Previous

Pyrogram documentation © Copyright 2017-2021, Dan

Licensed under the Creative Commons Attribution 4.0 International License

Built with Sphinx using a theme provided by Read the Docs.