Pre-release
This release is a pre-release and may not be stable for production use.
📦 Oxgram
from Oxgram.functions import Pyrogram
dcid = await Pyrogram.get01(update)
print(dcid)
from pyrogram import Client, filters
from pyrogram.types import (InlineKeyboardMarkup, InlineKeyboardButton)
from Oxgram.pyromod.types import ListenerTypes
from Oxgram.pyromod.exceptions import ListenerStopped
app = Client(
"my_bot",
api_id=123456,
api_hash="YOUR_API_HASH",
bot_token="YOUR_BOT_TOKEN"
)
@app.on_message(filters.command("start"))
async def start(client, message):
keyboard = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"❌ Cancel",
callback_data="cancel_listen"
)
]
]
)
msg = await message.reply("Send me a message:", reply_markup=keyboard)
try:
result = await client.listen(
listener_type=ListenerTypes.MESSAGE,
chat_id=message.chat.id,
user_id=message.from_user.id,
)
await msg.edit_text(f"✅ Received:\n\n{result.text}")
except ListenerStopped:
await msg.edit_text("❌ Listening cancelled.")
@app.on_callback_query(filters.regex("^cancel_listen$"))
async def cancel_listen(client, callback_query):
await callback_query.answer("Cancelling...")
await client.stop_listening(
listener_type=ListenerTypes.MESSAGE,
chat_id=callback_query.message.chat.id,
user_id=callback_query.from_user.id,
)
app.run()
Metadata
Release files for oxgram 0.0.14b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oxgram-0.0.14b1.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oxgram-0.0.14b1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.2 kB
Release files / oxgram-0.0.14b1.tar.gz
| Download URL | oxgram-0.0.14b1.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbcce1ef9d5bc8d4d7a9a1a83355cee4abb6b7765df139ff93b219332d174a5b
|
|
BLAKE2b-256 checksum How to use checksums |
7040a06c686c779252c2b46b33a5e27b4a7b822eb41cecc8c2703e8528833b68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / oxgram-0.0.14b1-py3-none-any.whl
| Download URL | oxgram-0.0.14b1-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7080647b4e9ccf0438f5b18ab8c81f0adfafe467c768814f255d70762042d531
|
|
BLAKE2b-256 checksum How to use checksums |
76a9f6354aa4a2348eb8bd225d04a49206e13103178c91d7425cbe93604340ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|