ABG
Requirements
- Python 3.8 ᴏʀ higher.
- hydrogram 0.0.1 ᴏʀ higher.
Installing :
Note: If you are using Hydrogram, avoid installing Pyrogram or its forks to prevent potential conflicts.
pip install -U Abg # For Pyrogram or Pyrogram Forks
pip install -U Abg[hydrogram] # For Hydrogram
pip install -U Abg[pyrofork] # for pyrofork
Getting Started
from hydrogram import Client
from hydrogram.types import CallbackQuery, Message
from Abg import * # type: ignore
from hydrogram.helpers import ikb
app = Client(
name='Abg',
api_id=6,
api_hash='eb06d4abfb49dc3eeb1aeb98ae0f581e',
bot_token="TOKEN",
in_memory=True,
)
@app.on_cmd("start")
async def start(self: Client, ctx: Message):
await ctx.reply_text("Hello World", reply_markup=ikb([[("Hello", "hello")]]))
@app.on_cb("hello")
async def hello(_: Client, q: CallbackQuery):
await q.answer("Hello From Abg", show_alert=True)
app.run()
Permissions Check for Admins
from Abg import * # type: ignore # (all patch)
from hydrogram.types import Message
from hydrogram import Client
app = Client("my_account")
@app.on_cmd("del", group_only=True)
@adminsOnly(
self=app,
permissions="can_delete_messages",
is_both=True,
) # also you can use like this @app.adminsOnly(permissions="can_delete_messages", is_both=True)
async def del_msg(self: Client, m: Message):
if m.reply_to_message:
await m.delete()
await self.delete_messages(
chat_id=m.chat.id,
message_ids=m.reply_to_message.id,
)
else:
await m.reply_text(text="Reply to a message to delete it")
app.run()
keyboard's
from Abg.patch.inline import InlineKeyboard, InlineButton
keyboard = InlineKeyboard(row_width=3)
keyboard.add(
InlineButton('1', 'inline_keyboard:1'),
InlineButton('2', 'inline_keyboard:2'),
InlineButton('3', 'inline_keyboard:3'),
InlineButton('4', 'inline_keyboard:4'),
InlineButton('5', 'inline_keyboard:5'),
InlineButton('6', 'inline_keyboard:6'),
InlineButton('7', 'inline_keyboard:7')
)
Metadata
Release files for Abg 2.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| abg-2.5.3.tar.gz | 41.4 kB | Without provenance | Details for abg-2.5.3.tar.gz |
Release files / abg-2.5.3.tar.gz
| Download URL | abg-2.5.3.tar.gz |
|---|---|
| Size | 41.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ae11bb66533fca225c5690cbcc2078bc027227030d1d27dc740cee186c0f542
|
|
BLAKE2b-256 checksum How to use checksums |
86423b612dec0717416ed45392025bd03cd2742ba18d9d758fcdd4f5e4ae9fac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for Abg 2.5.3
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.