├── .gitignore ├── LICENSE ├── Procfile ├── README.md ├── app.json ├── bot.py ├── requirements.txt └── runtime.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Muhammed 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | worker: python3 bot.py 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 🤖 𝗔𝘂𝘁𝗼-𝗔𝗽𝗽𝗿𝗼𝘃𝗲-𝗕𝗼𝘁 🤖 3 |
4 | 5 | ## First & Last Warning ⚠️ 6 | Changing The Code is NOT ALLOWED..!! 7 | You Are Free To Use This Code In Any Of Your Projects, But You Must Include The Following In Your Readme.Md (Copy & Paste) 8 | 9 | `Fork Tag` 10 | 11 | ``` 12 | ## Developer 13 | - [AutoApprove Bot by Mo Tech](https://github.com/PR0FESS0R-99/Auto-Approved-Bot) 14 | ``` 15 | 16 | 17 | 18 | 21 | 22 |
23 |
24 |
25 |
28 | ℹ️ 𝗨𝘀𝗲𝗴𝗲 ℹ️ 29 |
30 |31 | When a join request invitation link comes to your group, it will be accepted automatically. 32 |
33 | 34 |35 | ♦️ 𝗖𝗼𝗺𝗺𝗮𝗻𝗱 ♦️ 36 |
37 |38 | /start - Start 39 |
40 | 41 |42 | 🤔 𝗛𝗼𝘄 𝗧𝗼 𝗗𝗲𝗽𝗹𝗼𝘆 🤔 43 |
44 | 48 | 49 |50 | 🤔 𝗛𝗼𝘄 𝗧𝗼 𝗗𝗲𝗽𝗹𝗼𝘆 𝗜𝗻 𝗥𝗮𝗶𝗹𝘄𝗮𝘆 🤔 51 |
52 | 53 | 57 | 61 | 62 |63 | 📍 𝗥𝗲𝗾𝘂𝗶𝗿𝗲𝗱 📍 64 |
65 |66 | API_ID Click Here 67 |
68 |69 | API_HASH Click Here 70 |
71 |72 | BOT_TOKEN Click Here 73 |
74 |75 | CHAT_ID Click Here Group ID 76 |
77 |78 | APPROVED_WELCOME On Or Off Approved Welcome Text 79 |
80 |81 | APPROVED_WELCOME_TEXT Approved Welcome Text 82 |
83 | 84 |85 | 😎 𝗖𝗿𝗲𝗱𝗶𝘁𝘀 😎 86 |
87 |88 | Pyrogram 89 |
90 |91 | Muhammed 92 |
93 |94 | Orginal Repo 95 |
96 | 97 | 98 | 99 |100 | 🧑💻 𝗗𝗲𝗽𝗹𝗼𝘆 𝗧𝗼 𝗛𝗲𝗿𝗼𝗸𝘂 👨💻 101 |
102 | 105 | 106 |107 | 😎 𝗦𝘂𝗯𝘀𝗰𝗿𝗶𝗯𝗲 😎 108 |
109 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Auto-Approved-Bot", 3 | "description": "Iam Auto-Approved-Bot @pr0fess0r_99", 4 | "keywords": [ 5 | "Auto", 6 | "Approved", 7 | "Group", 8 | "Invite", 9 | "Link", 10 | "Bot" 11 | ], 12 | "website": "https://youtube.com/channel/UCmGBpXoM-OEm-FacOccVKgQ", 13 | "repository": "https://github.com/PR0FESS0R-99/Auto-Approved-Bot", 14 | "success_url": "https://youtube.com/channel/UCmGBpXoM-OEm-FacOccVKgQ", 15 | "env": { 16 | "API_ID": { 17 | "description": "Your APP ID From https://youtu.be/5eEsvLAKVc0 or @MT_MyTelegramOrg_Bot", 18 | "value": "" 19 | }, 20 | "API_HASH": { 21 | "description": "Your API Hash From https://youtu.be/5eEsvLAKVc0 or @MT_MyTelegramOrg_Bot", 22 | "value": "" 23 | }, 24 | "BOT_TOKEN": { 25 | "description": "Your Bot Token From @BotFather", 26 | "value": "" 27 | }, 28 | "CHAT_ID": { 29 | "description": "Working Group ID @MT_ID_Bot", 30 | "value": "" 31 | }, 32 | "APPROVED_WELCOME": { 33 | "description": "APPROVED_WELCOME On Or Off", 34 | "value": "on" 35 | }, 36 | "APPROVED_WELCOME_TEXT": { 37 | "description": "APPROVED_WELCOME_TEXT : Welcome Text", 38 | "value": "Hello {mention}\nWelcome To {title}\n\nYour Auto Approved" 39 | } 40 | }, 41 | "addons": [], 42 | "buildpacks": [{ 43 | "url": "heroku/python" 44 | }], 45 | "formation": { 46 | "worker": { 47 | "quantity": 1, 48 | "size": "eco" 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /bot.py: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | # Copyright (c) 2022 Muhammed 4 | 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | # Telegram Link : https://telegram.dog/Mo_Tech_Group 24 | # Repo Link : https://github.com/PR0FESS0R-99/Auto-Approved-Bot 25 | # License Link : https://github.com/PR0FESS0R-99/Auto-Approved-Bot/blob/Auto-Approved-Bot/LICENSE 26 | 27 | from os import environ 28 | from pyrogram import Client, filters 29 | from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message, User, ChatJoinRequest 30 | 31 | pr0fess0r_99=Client( 32 | "Auto Approved Bot", 33 | bot_token = environ["BOT_TOKEN"], 34 | api_id = int(environ["API_ID"]), 35 | api_hash = environ["API_HASH"] 36 | ) 37 | 38 | CHAT_ID = [int(pr0fess0r_99) for pr0fess0r_99 in environ.get("CHAT_ID", None).split()] 39 | TEXT = environ.get("APPROVED_WELCOME_TEXT", "Hello {mention}\nWelcome To {title}\n\nYour Auto Approved") 40 | APPROVED = environ.get("APPROVED_WELCOME", "on").lower() 41 | 42 | @pr0fess0r_99.on_message(filters.private & filters.command(["start"])) 43 | async def start(client: pr0fess0r_99, message: Message): 44 | approvedbot = await client.get_me() 45 | button = [[ InlineKeyboardButton("📦 Repo", url="https://github.com/PR0FESS0R-99/Auto-Approved-Bot"), InlineKeyboardButton("Updates 📢", url="t.me/Mo_Tech_YT") ], 46 | [ InlineKeyboardButton("➕️ Add Me To Your Chat ➕️", url=f"http://t.me/{approvedbot.username}?startgroup=botstart") ]] 47 | await client.send_message(chat_id=message.chat.id, text=f"**__Hello {message.from_user.mention} Iam Auto Approver Join Request Bot Just [Add Me To Your Group Channnl](http://t.me/{approvedbot.username}?startgroup=botstart) || Repo https://github.com/PR0FESS0R-99/Auto-Approved-Bot||**__", reply_markup=InlineKeyboardMarkup(button), disable_web_page_preview=True) 48 | 49 | @pr0fess0r_99.on_chat_join_request((filters.group | filters.channel) & filters.chat(CHAT_ID) if CHAT_ID else (filters.group | filters.channel)) 50 | async def autoapprove(client: pr0fess0r_99, message: ChatJoinRequest): 51 | chat=message.chat # Chat 52 | user=message.from_user # User 53 | print(f"{user.first_name} Joined 🤝") # Logs 54 | await client.approve_chat_join_request(chat_id=chat.id, user_id=user.id) 55 | if APPROVED == "on": 56 | await client.send_message(chat_id=chat.id, text=TEXT.format(mention=user.mention, title=chat.title)) 57 | # print("Welcome....") 58 | 59 | print("Auto Approved Bot") 60 | pr0fess0r_99.run() 61 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pyrogram==1.4.16 2 | tgcrypto 3 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.10.4 2 | --------------------------------------------------------------------------------