saad-bot
مكتبة Python بسيطة باسم SAAD_BOT لإرسال رسائل Telegram بواجهة عربية أو مختصرة، وتعمل على Pydroid 3 وTermux دون اعتماديات خارجية.
التثبيت
python -m pip install saad-bot
الاستخدام الآمن
لا تضع التوكن الحقيقي داخل ملف تنشره أو ترسله للآخرين. استخدم متغيرات البيئة:
import os
import saad_bot
saad_bot.configure(
token=os.environ["SAAD_BOT_TOKEN"],
user_id=os.environ["SAAD_BOT_USER_ID"],
)
result = saad_bot.أرسل("السلام عليكم")
print(result["ok"])
أو استخدم الصيغة المختصرة المتوافقة مع الفكرة الأصلية:
import saad_bot
saad_bot.T = "ضع_التوكن_محليًا_فقط"
saad_bot.USER = "123456789"
saad_bot.s("السلام عليكم")
والأسماء المفضلة والأوضح هي:
saad_bot.TOKEN = "..."
saad_bot.USER_ID = "..."
saad_bot.send_message("السلام عليكم")
ملاحظات
تستخدم المكتبة واجهة Telegram Bot API الرسمية عبر HTTPS، وتعيد كائن JSON الناتج من Telegram. إذا رفض Telegram الطلب، تُرفع TelegramError. لا تستخدم توكنًا سبق نشره؛ ألغِه من BotFather وأنشئ توكنًا جديدًا.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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
File details
Details for the file saad_bot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: saad_bot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d80b088bc6f1964e6ad80864ab7c134c8beb9cbc46586fd27b013a71da65a8d
|
|
| MD5 |
fe9a372af966f2447d7ae2fbf2fa3cb7
|
|
| BLAKE2b-256 |
b5e7e7be86d3360b5218d5e552314448a4346ddc7b8243244a90674b5f9262f4
|