Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saad_bot-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

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

Hashes for saad_bot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d80b088bc6f1964e6ad80864ab7c134c8beb9cbc46586fd27b013a71da65a8d
MD5 fe9a372af966f2447d7ae2fbf2fa3cb7
BLAKE2b-256 b5e7e7be86d3360b5218d5e552314448a4346ddc7b8243244a90674b5f9262f4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page