Unofficial iGap Bot API client for Python
Project description
igap-bot
python Library for iGap Bot
🏠 Homepage •
📘 Documentation •
📦 Releases •
🌟 igap-bot
Reliable. Scalable. Pythonic. A robust interface to build and manage iGap bots — with full support for automation interactions.
🚀 Async Example
from igap_bot.bot import BotClient, filters, Message
bot = BotClient("YOUR_TOKEN")
@bot.on_message()
async def get_message(message: Message):
await bot.send_message(message.room_id, "Hello from iGap Bot!")
bot.run()
🚀 send keyboard
from igap_bot.bot import BotClient, filters, Message
from igap_bot.bot.button import Button, ButtonRow, ButtonKeyboard, ActionTypeEnum, AdditionalTypeEnum
bot = BotClient("YOUR_TOKEN")
@bot.on_message(filters.text(text="دکمه", regex=True))
async def send_button(message: Message):
keyboard = ButtonKeyboard(
rows=[
# ردیف اول
ButtonRow(
buttons=[
Button(action_type=ActionTypeEnum.REQUEST_PHONE, label="ارسال شماره تلفن", value="phone"),
Button(action_type=ActionTypeEnum.BOT_ACTION, label="آیگپ بات 1", value="iGap-bot1")
]
),
# ردیف دوم
ButtonRow(buttons=[Button(action_type=ActionTypeEnum.BOT_ACTION, label="آیگپ بات 2", value="iGap-bot2")]),
]
)
await message.reply_message("send keyboard!", additional_type=AdditionalTypeEnum.UNDER_MESSAGE_BUTTON, additional_data=keyboard)
@bot.on_message(filters.button_value())
async def handel_button(message: Message):
if message.room_message.additional_data.value == "iGap-bot1":
await message.reply_message("روی iGap-bot1 کلیک کردید!")
if message.room_message.additional_data.value == "iGap-bot2":
await message.reply_message("روی iGap-bot2 کلیک کردید!")
@bot.on_message(filters.button_contact())
async def get_phone(message: Message):
phone = message.room_message.additional_data.value
await message.reply_message(f"شماره تلفن دریافت شد!\nشماره: {phone}")
bot.run()
⚡ Registering a handler for edited messages.
from igap_bot.bot import BotClient, filters, Message
@bot.on_edit_message()
async def get_message(message: Message):
message_id = message["messageId"]
await bot.send_message(message.room_id, "پیام را ویرایش کردید!", reply_to_message_id=message_id)
bot.run()
🚀 Why igap-bot?
- 📦 Instant Setup — Get started right after
pip install - 🧠 Beginner-Friendly — Simple, intuitive, and Pythonic by design
- 💅 Elegant — Hide the complexity, focus on clean code
- 🔁 Async Native — Built with async at its core, sync supported too
- 💪 Feature-Rich — Unlock all official client capabilities — plus extra powers
📦 Installation
pip install -U igap-bot
📣 Stay Connected
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
igap_bot-0.1.6.tar.gz
(115.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
igap_bot-0.1.6-py3-none-any.whl
(345.7 kB
view details)
File details
Details for the file igap_bot-0.1.6.tar.gz.
File metadata
- Download URL: igap_bot-0.1.6.tar.gz
- Upload date:
- Size: 115.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b88511b91b3cbe7691423c62944900c2571a7148813461b1f2ac2ae4d3ff603a
|
|
| MD5 |
5ef151c3a54c9ed5ea1d00a95ce582dc
|
|
| BLAKE2b-256 |
47cd6e8c0761dc1a05fbe163c28bb8cbf8bffed237af8639b611a1e93a33ffb3
|
File details
Details for the file igap_bot-0.1.6-py3-none-any.whl.
File metadata
- Download URL: igap_bot-0.1.6-py3-none-any.whl
- Upload date:
- Size: 345.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14d0893b10eafee4d8a62ced7dd9fd95ad0eeba71f10146780360c70bd9c9471
|
|
| MD5 |
a6cec84d1462b6ec3b57242124c7bc01
|
|
| BLAKE2b-256 |
e7e175ef945a6a1d9069b7c6d5530b8b27a7418c78abc7a5529b331e36bfb984
|