├── README.md ├── runtime.txt ├── Procfile ├── requirements.txt └── bot.py /README.md: -------------------------------------------------------------------------------- 1 | # welcome-bot -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.9.6 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | worker: python3 bot.py 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | python-telegram-bot 2 | -------------------------------------------------------------------------------- /bot.py: -------------------------------------------------------------------------------- 1 | from telegram import Update 2 | from telegram.ext import Updater , CommandHandler, CallbackQueryHandler, CallbackContext,Filters,MessageHandler 3 | import os 4 | 5 | Token =os.environ.get("BOT_TOKEN",None) 6 | updater = Updater( Token ,use_context = True ) 7 | 8 | def start(updater,context): 9 | updater.message.reply_text('''Hi iam welcome messanger bot 10 | Add me to your group 11 | 12 | Made with Love ❤️ by @lntechnical 13 | 14 | ''') 15 | def help(updater,context): 16 | updater.message.reply_text("Add me to your group ") 17 | 18 | 19 | def add_group(update: Update, context: CallbackContext): 20 | for member in update.message.new_chat_members: 21 | update.message.reply_text(f'Hello {member.full_name} , Welcome to ln support Thank you for Joining ') 22 | 23 | add_group_handle = MessageHandler(Filters.status_update.new_chat_members, add_group) 24 | updater.dispatcher.add_handler(add_group_handle) 25 | 26 | dp =updater.dispatcher.add_handler 27 | dp(CommandHandler('start',start)) 28 | dp(CommandHandler('help',help)) 29 | 30 | updater.start_polling() 31 | updater.idle() 32 | --------------------------------------------------------------------------------