import telebot
import time

# توکن رباتت رو اینجا بذار
TOKEN = "8162477317:AAGFh91GQCiW33PY2T59OGeiGtQzHyLJOHw"
bot = telebot.TeleBot(TOKEN)

# پاسخ به دستور /start
@bot.message_handler(commands=['start'])
def send_welcome(message):
    bot.reply_to(message, "✅ سلام! ربات با موفقیت روی هاست اجرا شد.")

# پاسخ به هر پیام متنی
@bot.message_handler(func=lambda message: True)
def echo_all(message):
    bot.reply_to(message, f"📨 پیام شما دریافت شد:\n{message.text}")

print("🤖 ربات روشن شد و داره کار میکنه...")

# اجرای ربات
if __name__ == "__main__":
    try:
        bot.infinity_polling()
    except Exception as e:
        print(f"خطا: {e}")