Skip to main content

Pyropatch

An advanced monkeypatcher add-on for Pyrogram

Installation

Install pyropatch with pip

  pip install pyropatch

Usage/Examples

All patches

  • Command Handler
  • Flood Handler
  • Listen
from pyropatch import pyropatch                    #apply all patches
from pyrogram import Client

app = Client(...)

Command Handler

from pyropatch import command_handler                   #apply command handler
from pyrogram import Client

app = Client(...)

#pass info along with commands in command filter
@app.on_message(filters.command(commands='start',info='Check Bot is Alive'))

# to set bot commands from the command available on bot
app.auto_set_commands()

# to get all the commands available in bot
app.commands

Flood Handler

from pyropatch import flood_handler                   #apply flood handler
from pyrogram import Client

app = Client(...)

# all floodwaits will automatically handled
app.send_message("me", "Flood handled with **Pyropatch**!")

Listen

from pyropatch import listen                   #apply listen
from pyrogram import Client

app = Client(...)
# listen for a message in a particular chat
m = app.listen_message(chat_id=chat_id, filters=filters, timeout=timeout)

# listen for a callback data in a particular message
u = app.listen_callback(chat_id=chat_id, message_id=message_id, filters=filters, timeout=timeout)
u = app.listen_callback(inline_message_id=inline_message_id, filters=filters, timout=timeout)

# listen for an inline query 
u = app.listen_inline_query(user_id=user_id, filters=filters, timeout=timeout)

# listen for an inline result 
u = app.listen_inline_result(user_id=user_id, filters=filters, timeout=timeout)

More Comming Soon

Special thanks to Pyromod

Metadata

Release files for pyropatch 2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyropatch 2.1
File Size Uploaded Provenance
pyropatch-2.1.tar.gz 20.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyropatch 2.1
File Interpreter ABI Platform
pyropatch-2.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.0 kB

Release files / pyropatch-2.1.tar.gz

Download URL pyropatch-2.1.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
195355bd92b1b3c050c51da81cf9e7d6765ad3857330fe68f65e3733f2f04233
BLAKE2b-256 checksum
How to use checksums
b66daf53c1b9b4a25dc108366c7e4f101ca198010502a271201096e90488d9f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / pyropatch-2.1-py3-none-any.whl

Download URL pyropatch-2.1-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5929590c4b8ca2c5ae51291f76861cce1938fe1fe035da056fe5d5e611dae55
BLAKE2b-256 checksum
How to use checksums
36c61dfbab4e7b5cfaebf81e5f460705c8edd33f2d1893a6935dc34a4fb4094e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Security for pyropatch 2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page