Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ABG

Requirements

Installing :

pip install -U git+https://github.com/Abishnoi69/Abg@dev
or
pip install -U Abg

Example

sᴇᴛᴜᴘ

from pyrogram import filters, Client
from pyrogram.types import CallbackQuery, Message
from Abg import patch  # type : ignore
from Abg.helpers import ikb

app = Client("my_account")

@app.on_cmd("start")
async def start(self: Client, ctx: Message):
    await self.send_msg(
        chat_id=ctx.chat.id,
        text=f"ok",
        reply_markup=ikb([[("ʙᴜᴛᴛᴏɴ", "hello")]]),
    )

# callback 
@app.on_cb("hello")
async def hello(c: Client, q: CallbackQuery):
    await q.answer("Hello From Abg", show_alert=True)

  app.run()

ᴜsᴇʀ/ʙᴏᴛ ʀɪɢʜᴛs

from Abg import patch  # all patch
from pyrogram.types import Message
from pyrogram import Client

app = Client("my_account")

@app.on_cmd("del", group_only=True)
@app.adminsOnly(permissions="can_delete_messages", is_both=True)
async def del_msg(c: Client, m: Message):
    if m.reply_to_message:
        await m.delete()
        await c.delete_messages(
            chat_id=m.chat.id,
            message_ids=m.reply_to_message.id,
        )
    else:
        await m.reply_text(text="ᴡʜᴀᴛ ᴅᴏ ʏᴏᴜ ᴡᴀɴɴᴀ ᴅᴇʟᴇᴛᴇ?")
    return
  
  app.run()

keyboard's

from Abg.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')
)

ʀᴇsᴜʟᴛ

add_inline_button

━━━━━━━━━━━━━━━━━━━━

Configuratoins

OWNER_ID = ʏᴏᴜʀ ᴛᴇʟᴇɢʀᴀᴍ ɪᴅ.
DEV_USERS = ʙᴏᴛ ᴅᴇᴠs ɪᴅ. (ʏᴏᴜ ᴄᴀɴ ᴀᴅᴅ ᴀ ʟɪsᴛ : 1 2 3)
LOGGER_ID = ʏᴏᴜʀ ᴘʀɪᴠᴀᴛᴇ ɢʀᴏᴜᴘ/ᴄʜᴀɴɴᴇʟ ɪᴅ. (ʜᴇʀᴇ ʙᴏᴛ sᴇɴᴅ ʟᴏɢs)

━━━━━━━━━━━━━━━━━━━━

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Abg-2.3.6.dev1.tar.gz (25.0 kB view details)

Uploaded Source

File details

Details for the file Abg-2.3.6.dev1.tar.gz.

File metadata

  • Download URL: Abg-2.3.6.dev1.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for Abg-2.3.6.dev1.tar.gz
Algorithm Hash digest
SHA256 76d96bc35f99191ede277b4c68f9a45fc3c18537a9b1294658ad596cf5e39923
MD5 177ad2aa78678744aa9d5e09d6006854
BLAKE2b-256 4d0af0d3b46d5a2b3dcabda051ca23fe2cbb68ba950cd1535cb40a6c45092c6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page