def check(update, context): if update.message.new_chat_members: for new_member in update.message.new_chat_members: if new_member.username == bot_name: return start(update, context) else: return welcome(update, context, new_member)
def welcoming_task(message): if not validate_command(message, check_chat=True): return welcome.welcome(message)