Download bot.py from REDMOOD/bot: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/spaces/REDMOOD/bot/resolve/main/bot.py
- Command line
-
hf download hf://spaces/REDMOOD/bot/bot.py
-
curl -L -o bot.py https://huggingface.co/spaces/REDMOOD/bot/resolve/main/bot.py
580 Bytes
| import telebot | |
| import time | |
| BOT_TOKEN = "6858517910:AAGQ3WoJy1hGPls_cn1IDmd9rV7o8KXn_eM" | |
| bot = telebot.TeleBot(BOT_TOKEN, parse_mode="HTML") | |
| def welcome(message): | |
| bot.reply_to(message, "🟢 أهلاً بك! البوت شغال الآن بنجاح وعاش الاستقرار على بيئة Static!") | |
| if __name__ == "__main__": | |
| print("🤖 Bot is running...") | |
| while True: | |
| try: | |
| bot.infinity_polling(timeout=60, long_polling_timeout=60) | |
| except Exception as e: | |
| time.sleep(5) | |