REDMOOD commited on
Commit
fe50c4b
·
verified ·
1 Parent(s): 9f81f1b

Create bot.py

Browse files
Files changed (1) hide show
  1. bot.py +18 -0
bot.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import telebot
2
+ import time
3
+
4
+ BOT_TOKEN = "6858517910:AAGQ3WoJy1hGPls_cn1IDmd9rV7o8KXn_eM"
5
+ bot = telebot.TeleBot(BOT_TOKEN, parse_mode="HTML")
6
+
7
+ @bot.message_handler(commands=['start'])
8
+ def welcome(message):
9
+ bot.reply_to(message, "🟢 أهلاً بك! البوت شغال الآن بنجاح وعاش الاستقرار على بيئة Static!")
10
+
11
+ if __name__ == "__main__":
12
+ print("🤖 Bot is running...")
13
+ while True:
14
+ try:
15
+ bot.infinity_polling(timeout=60, long_polling_timeout=60)
16
+ except Exception as e:
17
+ time.sleep(5)
18
+