🤖 soroush-bot
soroush-bot یک کتابخانهی پایتون برای ساخت رباتهای پیامرسان سروش پلاس است. این کتابخانه با الهام از python-telegram-bot نسخه ۲۲ به بالا طراحی شده تا توسعهدهندگان بتوانند بهراحتی و با کمترین تغییرات، رباتهای خود را برای سروش بسازند.
✨ ویژگیها
- سینتکس آشنا – مشابه
python-telegram-botv22+ - کاملاً ناهمگام (Async) – مبتنی بر
asyncioوaiohttp - پشتیبانی از تمام متدهای API سروش پلاس – ارسال پیام، عکس، صدا، ویدئو، استیکر، فایل، ویرایش، حذف و ...
- هندلرهای قدرتمند –
CommandHandler,MessageHandler,CallbackQueryHandler - فیلترهای انعطافپذیر – ترکیب با
&,|,~ - مدیریت خودکار offset – بدون نگرانی از دریافت پیامهای تکراری
- بستن صحیح session – جلوگیری از خطای "Unclosed client session"
📦 نصب
pip install soroush-bot
یا مستقیماً از گیتهاب:
pip install git+https://github.com/AmirrezaJalilian/soroush-bot.git
توصیه: از یک محیط مجازی (venv) استفاده کنید.
🚀 شروع سریع
یک ربات ساده با دستور /start:
from soroush_bot import Application, CommandHandler
async def start(update, context):
await update.message.reply_text("سلام! به ربات سروش خوش آمدید.")
def main():
app = Application("YOUR_BOT_TOKEN")
app.add_handler(CommandHandler("start", start))
app.run_polling()
if __name__ == "__main__":
main()
برای دریافت توکن، به ربات @BotFather در سروش مراجعه کنید.
📁 ساختار پروژه
soroush_bot/
├── __init__.py # صادرات عمومی
├── application.py # کلاس Application
├── handlers.py # هندلرها
├── filters.py # فیلترها
├── types.py # انواع داده (Message, User, ...)
├── context.py # Context
└── client.py # کلاینت کامل API سروش
example_bot.py # نمونه ربات ساده
README.md # این فایل
LICENSE # مجوز MIT
pyproject.toml # تنظیمات PyPI
🤝 مشارکت
ما خوشحال میشویم که شما در بهبود این پروژه مشارکت کنید! لطفاً مراحل زیر را دنبال کنید:
- فورک (Fork) مخزن
- یک برنچ جدید ایجاد کنید (
git checkout -b feature/amazing-feature) - تغییرات خود را کامیت کنید (
git commit -m 'Add some amazing feature') - پوش کنید (
git push origin feature/amazing-feature) - یک Pull Request باز کنید
📜 مجوز
این پروژه تحت مجوز MIT منتشر شده است. برای جزئیات بیشتر به فایل LICENSE مراجعه کنید.
💬 ارتباط با ما
- گیتهاب: https://github.com/AmirrezaJalilian/soroush-bot
- PyPI: https://pypi.org/project/soroush-bot/
- سروش پلاس: https://soroushplus.com
ساخته شده با ❤️ برای جامعه سروش پلاس
Metadata
Release files for soroush-bot 1.0.0
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 |
|---|---|---|---|---|
| soroush_bot-1.0.0.tar.gz | 14.1 kB | Without provenance | Details for soroush_bot-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| soroush_bot-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for soroush_bot-1.0.0-py3-none-any.whl |
Total release size: 27.4 kB
Release files / soroush_bot-1.0.0.tar.gz
| Download URL | soroush_bot-1.0.0.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d71c802c5c89b5f9ab0a6c715f02e08347d4f47d6c39f2cbd7a7e2c38756b9b5
|
|
BLAKE2b-256 checksum How to use checksums |
02f79a8160229a924e09db7c40774c2835a5fe98d321f09a621baa7f6bccb61a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / soroush_bot-1.0.0-py3-none-any.whl
| Download URL | soroush_bot-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e181baae577186f2a33212c981ba2be2a6c348b68624e66b73dff3529b17b7a
|
|
BLAKE2b-256 checksum How to use checksums |
1a7e69940eb134fddb6a478b766586815a1d0c1d0fcc61f3b4bff249be58903d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for soroush-bot 1.0.0
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.