from telegram import Update from telegram.ext import ApplicationBuilder, CommandHandler, MessageHandler, filters, ContextTypes
TOKEN = "8553344148:AAGG0V3kgxsCQKlbDgE6QG25xueUuj0_VF4"
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): await update.message.reply_text("سلام! من ربات خوشآمدگویی هستم 😊🌟")
async def welcome(update: Update, context: ContextTypes.DEFAULT_TYPE): if update.message.new_chat_members: for member in update.message.new_chat_members: await update.message.reply_text(f"🌟 خوش اومدی {member.first_name}!")
app = ApplicationBuilder().token(TOKEN).build()
app.add_handler(CommandHandler("start", start)) app.add_handler(MessageHandler(filters.StatusUpdate.NEW_CHAT_MEMBERS, welcome))
app.run_polling()