├── CODE_OF_CONDUCT.md ├── Chatgpt ├── __init__.py ├── __main__.py ├── database │ ├── __init__.py │ ├── chats_db.py │ └── users_db.py └── modules │ ├── __init__.py │ ├── alive.py │ ├── bard.py │ ├── blackbox.py │ ├── buttons.py │ ├── callbacks.py │ ├── chatgpt.py │ ├── help.py │ ├── source.py │ ├── start.py │ └── stats.py ├── Dockerfile ├── LICENSE ├── Procfile ├── README.md ├── SECURITY.md ├── app.json ├── app.py ├── config.py ├── heruko.yml ├── requirements.txt └── runtime.txt /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Citizen Code of Conduct 2 | 3 | ## 1. Purpose 4 | 5 | A primary goal of Chatgpt Bot is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof). 6 | 7 | This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior. 8 | 9 | We invite all those who participate in Chatgpt Bot to help us create safe and positive experiences for everyone. 10 | 11 | ## 2. Open [Source/Culture/Tech] Citizenship 12 | 13 | A supplemental goal of this Code of Conduct is to increase open [source/culture/tech] citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community. 14 | 15 | Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society. 16 | 17 | If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know. 18 | 19 | ## 3. Expected Behavior 20 | 21 | The following behaviors are expected and requested of all community members: 22 | 23 | * Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. 24 | * Exercise consideration and respect in your speech and actions. 25 | * Attempt collaboration before conflict. 26 | * Refrain from demeaning, discriminatory, or harassing behavior and speech. 27 | * Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. 28 | * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations. 29 | 30 | ## 4. Unacceptable Behavior 31 | 32 | The following behaviors are considered harassment and are unacceptable within our community: 33 | 34 | * Violence, threats of violence or violent language directed against another person. 35 | * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language. 36 | * Posting or displaying sexually explicit or violent material. 37 | * Posting or threatening to post other people's personally identifying information ("doxing"). 38 | * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. 39 | * Inappropriate photography or recording. 40 | * Inappropriate physical contact. You should have someone's consent before touching them. 41 | * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances. 42 | * Deliberate intimidation, stalking or following (online or in person). 43 | * Advocating for, or encouraging, any of the above behavior. 44 | * Sustained disruption of community events, including talks and presentations. 45 | 46 | ## 5. Weapons Policy 47 | 48 | No weapons will be allowed at Chatgpt Bot events, community spaces, or in other spaces covered by the scope of this Code of Conduct. Weapons include but are not limited to guns, explosives (including fireworks), and large knives such as those used for hunting or display, as well as any other item used for the purpose of causing injury or harm to others. Anyone seen in possession of one of these items will be asked to leave immediately, and will only be allowed to return without the weapon. Community members are further expected to comply with all state and local laws on this matter. 49 | 50 | ## 6. Consequences of Unacceptable Behavior 51 | 52 | Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated. 53 | 54 | Anyone asked to stop unacceptable behavior is expected to comply immediately. 55 | 56 | If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event). 57 | 58 | ## 7. Reporting Guidelines 59 | 60 | If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. . 61 | 62 | 63 | 64 | Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress. 65 | 66 | ## 8. Addressing Grievances 67 | 68 | If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies. 69 | 70 | 71 | 72 | ## 9. Scope 73 | 74 | We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications pertaining to community business. 75 | 76 | This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members. 77 | 78 | ## 10. Contact info 79 | 80 | 81 | 82 | ## 11. License and attribution 83 | 84 | The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). 85 | 86 | Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). 87 | 88 | _Revision 2.3. Posted 6 March 2017._ 89 | 90 | _Revision 2.2. Posted 4 February 2016._ 91 | 92 | _Revision 2.1. Posted 23 June 2014._ 93 | 94 | _Revision 2.0, adopted by the [Stumptown Syndicate](http://stumptownsyndicate.org) board on 10 January 2013. Posted 17 March 2013._ 95 | -------------------------------------------------------------------------------- /Chatgpt/__init__.py: -------------------------------------------------------------------------------- 1 | from config import * 2 | import logging 3 | 4 | from motor.motor_asyncio import AsyncIOMotorClient as MongoCli 5 | from pyrogram import Client 6 | 7 | 8 | logging.basicConfig( 9 | format="[%(asctime)s - %(levelname)s] - %(name)s - %(message)s", 10 | datefmt="%d-%b-%y %H:%M:%S", 11 | handlers=[logging.FileHandler("log.txt"), logging.StreamHandler()], 12 | level=logging.INFO, 13 | ) 14 | logging.getLogger("pyrogram").setLevel(logging.ERROR) 15 | 16 | LOGGER = logging.getLogger(__name__) 17 | 18 | mongo = MongoCli(MONGO_DB_URI) 19 | db = mongo.Chatgpt 20 | 21 | 22 | class Mukesh(Client): 23 | def __init__(self): 24 | super().__init__( 25 | name="Chatgpt", 26 | api_id=API_ID, 27 | api_hash=API_HASH, 28 | lang_code="en", 29 | bot_token=BOT_TOKEN, 30 | in_memory=True, 31 | ) 32 | 33 | async def start(self): 34 | await super().start() 35 | self.id = self.me.id 36 | self.name = self.me.first_name + " " + (self.me.last_name or "") 37 | self.username = self.me.username 38 | self.mention = self.me.mention 39 | 40 | async def stop(self): 41 | await super().stop() 42 | 43 | 44 | Mukesh = Mukesh() -------------------------------------------------------------------------------- /Chatgpt/__main__.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import importlib 3 | from config import START_IMG,OWNER_ID 4 | from pyrogram import idle 5 | 6 | from Chatgpt import LOGGER, Mukesh 7 | from Chatgpt.modules import ALL_MODULES 8 | 9 | 10 | async def Chatgpt_start(): 11 | try: 12 | await Mukesh.start() 13 | except Exception as ex: 14 | LOGGER.error(ex) 15 | quit(1) 16 | 17 | for all_module in ALL_MODULES: 18 | importlib.import_module("Chatgpt.modules." + all_module) 19 | 20 | LOGGER.info(f"@{Mukesh.username} Started.") 21 | await Mukesh.send_photo(OWNER_ID,START_IMG,"I am Alive") 22 | await idle() 23 | 24 | 25 | if __name__ == "__main__": 26 | asyncio.get_event_loop().run_until_complete(Chatgpt_start()) 27 | LOGGER.info("Stopping Chatgpt bot") -------------------------------------------------------------------------------- /Chatgpt/database/__init__.py: -------------------------------------------------------------------------------- 1 | from .chats_db import * 2 | from .users_db import * -------------------------------------------------------------------------------- /Chatgpt/database/chats_db.py: -------------------------------------------------------------------------------- 1 | from .. import db 2 | 3 | chatsdb = db.chatsdb 4 | 5 | 6 | async def get_served_chats() -> list: 7 | chats = chatsdb.find({"chat_id": {"$lt": 0}}) 8 | if not chats: 9 | return [] 10 | chats_list = [] 11 | for chat in await chats.to_list(length=1000000000): 12 | chats_list.append(chat) 13 | return chats_list 14 | 15 | 16 | async def is_served_chat(chat_id: int) -> bool: 17 | chat = await chatsdb.find_one({"chat_id": chat_id}) 18 | if not chat: 19 | return False 20 | return True 21 | 22 | 23 | async def chat_id(chat_id: int): 24 | is_served = await is_served_chat(chat_id) 25 | # CREDITS 26 | # TELEGRAM : @Mr_Sukkun 27 | # GITHUB : NOOB-MUKESH 28 | if is_served: 29 | return 30 | return await chatsdb.insert_one({"chat_id": chat_id}) 31 | 32 | 33 | async def remove_served_chat(chat_id: int): 34 | is_served = await is_served_chat(chat_id) 35 | if not is_served: 36 | return 37 | return await chatsdb.delete_one({"chat_id": chat_id}) -------------------------------------------------------------------------------- /Chatgpt/database/users_db.py: -------------------------------------------------------------------------------- 1 | from .. import db 2 | 3 | usersdb = db.users 4 | 5 | 6 | async def is_served_user(user_id: int) -> bool: 7 | user = await usersdb.find_one({"user_id": user_id}) 8 | if not user: 9 | return False 10 | return True 11 | 12 | 13 | async def get_served_users() -> list: 14 | users_list = [] 15 | async for user in usersdb.find({"user_id": {"$gt": 0}}): 16 | users_list.append(user) 17 | return users_list 18 | 19 | # # CREDITS 20 | # TELEGRAM : @Mr_Sukkun 21 | # GITHUB : NOOB-MUKESH 22 | 23 | async def save_id(user_id: int): 24 | is_served = await is_served_user(user_id) 25 | if is_served: 26 | return 27 | return usersdb.insert_one({"user_id": user_id}) 28 | -------------------------------------------------------------------------------- /Chatgpt/modules/__init__.py: -------------------------------------------------------------------------------- 1 | import glob 2 | from os.path import basename, dirname, isfile 3 | 4 | 5 | def __list_all_modules(): 6 | mod_paths = glob.glob(dirname(__file__) + "/*.py") 7 | 8 | all_modules = [ 9 | basename(f)[:-3] 10 | for f in mod_paths 11 | if isfile(f) and f.endswith(".py") and not f.endswith("__init__.py") 12 | ] 13 | 14 | return all_modules 15 | 16 | 17 | ALL_MODULES = sorted(__list_all_modules()) 18 | __all__ = ALL_MODULES + ["ALL_MODULES"] -------------------------------------------------------------------------------- /Chatgpt/modules/alive.py: -------------------------------------------------------------------------------- 1 | # -----------CREDITS ----------- 2 | # telegram : @Mr_Sukkun 3 | # github : noob-mukesh 4 | from pyrogram import filters 5 | import asyncio, time 6 | from .. import Mukesh 7 | from config import START_IMG 8 | from ..modules.buttons import * 9 | 10 | 11 | 12 | @Mukesh.on_message( 13 | filters.command(["ping", "alive"], prefixes=["+", "/", "-", "?", "$", "&", "."]) 14 | ) 15 | async def ping(_, message): 16 | start = time.time() 17 | t = "__ᴘɪɴɢɪɴɢ...__" 18 | txxt = await message.reply(t) 19 | await asyncio.sleep(0.25) 20 | await txxt.edit_text("__ᴘɪɴɢɪɴɢ.....__") 21 | await asyncio.sleep(0.35) 22 | await txxt.delete() 23 | end = time.time() 24 | ms = str(round((end - start) * 1000, 3)) + " ᴍs" 25 | await message.reply_photo( 26 | photo=START_IMG, 27 | caption=f"ʜᴇʏ ʙᴀʙʏ!!\n{Mukesh.mention} ɪꜱ ᴀʟɪᴠᴇ 🥀 ᴀɴᴅ ᴡᴏʀᴋɪɴɢ ꜰɪɴᴇ ᴡɪᴛʜ ᴘᴏɴɢ ᴏꜰ \n➥ {ms} \n\n**ᴍᴀᴅᴇ ᴡɪᴛʜ ❣️ ʙʏ @mr_sukkun**", 28 | reply_markup=IKM(PNG_BTN), 29 | ) -------------------------------------------------------------------------------- /Chatgpt/modules/bard.py: -------------------------------------------------------------------------------- 1 | # -----------CREDITS ----------- 2 | # telegram : @Mr_Sukkun 3 | # github : noob-mukesh 4 | from pyrogram import filters 5 | from pyrogram.enums import ChatAction 6 | from pyrogram.types import InlineKeyboardMarkup 7 | import asyncio, time,requests 8 | from .. import Mukesh 9 | from config import * 10 | from ..modules.buttons import * 11 | # bard 12 | from MukeshAPI import api 13 | x=None 14 | @Mukesh.on_message(filters.command(["bard"], prefixes=["+", ".", "/", "-", "?", "$","#","&"])) 15 | async def bard_chat(bot, message): 16 | global x 17 | if len(message.command) < 2: 18 | await message.reply_text( 19 | "Example:**\n\n`/bard write shorts notes on human eyes`") 20 | else: 21 | a = message.text.split(' ', 1)[1] 22 | 23 | try: 24 | response =api.gemini(a) 25 | await bot.send_chat_action(message.chat.id, ChatAction.TYPING) 26 | x=response["results"] 27 | 28 | await message.reply_text(f"{x}\n🎉ᴘᴏᴡᴇʀᴇᴅ ʙʏ @{Mukesh.username} ",reply_markup=InlineKeyboardMarkup(gpt_button),quote=True) 29 | 30 | except requests.exceptions.RequestException as e: 31 | pass 32 | 33 | -------------------------------------------------------------------------------- /Chatgpt/modules/blackbox.py: -------------------------------------------------------------------------------- 1 | # -----------CREDITS ----------- 2 | # telegram : @Mr_Sukkun 3 | # github : noob-mukesh 4 | from pyrogram import filters 5 | import asyncio, time,requests 6 | from pyrogram.types import InlineKeyboardMarkup 7 | from .. import Mukesh 8 | from pyrogram.enums import ChatAction,ParseMode 9 | from config import * 10 | from ..modules.buttons import * 11 | 12 | 13 | from MukeshAPI import api 14 | x=None 15 | #blackbox 16 | @Mukesh.on_message(filters.command(["blackbox"], prefixes=["+", ".", "/", "-", "?", "$","#","&"])) 17 | async def blackbox_chat(bot, message): 18 | if len(message.command) < 2: 19 | await message.reply_text( 20 | "Example:**\n\n`/blackbox write simple flask app code`") 21 | else: 22 | a = message.text.split(' ', 1)[1] 23 | # CREDITS 24 | # TELEGRAM : @Mr_Sukkun 25 | # GITHUB : NOOB-MUKESH 26 | try: 27 | response = api.blackbox(a) 28 | 29 | await bot.send_chat_action(message.chat.id, ChatAction.TYPING) 30 | x=response["results"] 31 | 32 | await message.reply_text(f"{x}\n🎉ᴘᴏᴡᴇʀᴇᴅ ʙʏ @{Mukesh.username} ",reply_markup=InlineKeyboardMarkup(gpt_button),quote=True,disable_web_page_preview =True,parse_mode=ParseMode.MARKDOWN) 33 | 34 | 35 | except requests.exceptions.RequestException as e: 36 | pass 37 | 38 | -------------------------------------------------------------------------------- /Chatgpt/modules/buttons.py: -------------------------------------------------------------------------------- 1 | # CREDITS 2 | # TELEGRAM : @Mr_Sukkun 3 | # GITHUB : NOOB-MUKESH 4 | 5 | from pyrogram.types import InlineKeyboardButton as IKB, InlineKeyboardMarkup as IKM 6 | from config import * 7 | from random import choice 8 | from .. import Mukesh 9 | 10 | import requests,base64 11 | 12 | def send(): 13 | x=base64.b64decode('aHR0cHM6Ly9naXRodWIuY29tL05vb2ItbXVrZXNoL0NoYXRncHQtYm90').decode("utf-8") 14 | return x 15 | 16 | xy=send() 17 | 18 | START = f""" 19 | ๏ ʜᴇʏ, ɪ ᴀᴍ {Mukesh.name} 20 | 21 | ➻ ᴀɴ ᴏᴘᴇɴ-ᴀɪ-ʙᴀsᴇᴅ ᴄʜᴀᴛɢᴘᴛ. 22 | ────────────────── 23 | ɪ ᴀᴍ ᴀᴅᴠᴀɴᴄᴇ ʙᴏᴛ ᴀɴᴅ ᴄᴀɴ 24 | ᴀɴsᴡᴇʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀɪᴇs ᴇᴀsʟɪʏ 25 | ────────────────── 26 | Rᴇᴀᴅ Tʜᴇ ʜᴇʟᴘ sᴇᴄᴛɪᴏɴ ғᴏʀ ᴍᴏʀᴇ ɪɴғᴏ 27 | 28 | Pᴏᴡᴇʀᴇᴅ Bʏ @Mr_Sukkun """ 29 | SOURCE_TEXT = f""" 30 | ๏ ʜᴇʏ, ɪ ᴀᴍ {Mukesh.name} 31 | ────────────────── 32 | ᴄʟɪᴄᴋ ʙᴇʟᴏᴡ ʙᴜᴛᴛᴏɴ ᴛᴏ ɢᴇᴛ ᴛʜᴇ sᴏᴜʀᴄᴇ ᴄᴏᴅᴇ 33 | """ 34 | HELP = f"""➻ ʜᴇʀᴇ ɪs ᴛʜᴇ ʜᴇʟᴘ ᴍᴇɴᴜ ᴏғ {Mukesh.mention} 35 | /chatgpt ᴇxᴀᴍᴘʟᴇ: `/chatgpt write shorts notes of electricity` 36 | /bard ᴇxᴀᴍᴘʟᴇ: `/bard write a simple flask app in python.` 37 | /blackbox ᴇxᴀᴍᴘʟᴇ: `/blackbox write a simple website using python.` 38 | /ping ᴛᴏ ᴄʜᴇᴄᴋ ᴛʜᴇ ᴘɪɴɢ ᴏғ ᴛʜᴇ ʙᴏᴛ. 39 | /source Tᴏ ɢᴇᴛ sᴏᴜʀᴄᴇ ᴄᴏᴅᴇ , 40 | /help Tᴏ ɢᴇᴛ ʜᴇʟᴘ 41 | /start Tᴏ sᴛᴀʀᴛ ʙᴏᴛ 42 | /stats Tᴏ ɢᴇᴛ sᴛᴀᴛs ᴏғ ᴛʜᴇ ʙᴏᴛ 43 | 44 | 45 | """ 46 | 47 | x = ["❤️", "🎉", "✨", "🪸", " 🎉 ", " 🎈 ", "🎯"] 48 | g = choice(x) 49 | 50 | 51 | MAIN = [ 52 | [ 53 | IKB( 54 | text="ᴀᴅᴅ ᴍᴇ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴘ", 55 | url=f"https://t.me/{Mukesh.username}?startgroup=true", 56 | ), 57 | ], 58 | [ 59 | IKB(text="ʜᴇʟᴘs", callback_data="HELP"), 60 | ], 61 | [ 62 | IKB(text="sᴏᴜʀᴄᴇ ", callback_data="HELP_source"), 63 | 64 | IKB(text="ᴅᴇᴠᴇʟᴏᴘᴇʀ", user_id=OWNER_ID), 65 | ] 66 | ] 67 | 68 | PNG_BTN = [ 69 | [ 70 | IKB( 71 | text="ᴀᴅᴅ ᴍᴇ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴘ", 72 | url=f"https://t.me/{Mukesh.username}?startgroup=true", 73 | ), 74 | ], 75 | [ 76 | IKB("sᴜᴘᴘᴏʀᴛ", 77 | url=f"https://t.me/{SUPPORT_GRP}", 78 | ), 79 | ], 80 | ] 81 | 82 | gpt_button = [ 83 | [ 84 | IKB( 85 | text="ᴀᴅᴅ ᴍᴇ", 86 | url=f"https://t.me/{Mukesh.username}?startgroup=true", 87 | ), 88 | 89 | IKB("ᴅᴇᴠᴇʟᴏᴘᴇʀ", user_id=OWNER_ID) 90 | ], 91 | ] 92 | 93 | 94 | 95 | HELP_BACK = [ 96 | 97 | [ 98 | IKB("ʙᴀᴄᴋ", callback_data="HELP_BACK"), 99 | ], 100 | ] 101 | 102 | SOURCE_BUTTONS = IKM( 103 | [ 104 | [IKB("sᴏᴜʀᴄᴇ", callback_data="HELP_hurr")], 105 | [ 106 | IKB(" ꜱᴜᴘᴘᴏʀᴛ ", url=f"https://t.me/{SUPPORT_GRP}"), 107 | IKB(text="ʙᴀᴄᴋ ", callback_data="HELP_BACK") 108 | ] 109 | ] 110 | ) 111 | SOURCE_BUTTON = IKM( 112 | [ 113 | [IKB("sᴏᴜʀᴄᴇ" ,url=xy) 114 | ] 115 | ] 116 | ) 117 | -------------------------------------------------------------------------------- /Chatgpt/modules/callbacks.py: -------------------------------------------------------------------------------- 1 | # CREDITS 2 | # TELEGRAM : @Mr_Sukkun 3 | # GITHUB : NOOB-MUKESH 4 | 5 | from pyrogram.types import InlineKeyboardButton as IKB, InlineKeyboardMarkup as IKM,CallbackQuery 6 | from pyrogram import Client 7 | from .. import Mukesh 8 | from pyrogram import filters 9 | from ..modules.buttons import * 10 | @Mukesh.on_callback_query(filters.regex("^HELP")) 11 | async def callback_handler(_: Client, query: CallbackQuery): 12 | try: 13 | if query.data == "HELP": 14 | await query.message.edit_text( 15 | text=HELP, 16 | reply_markup=IKM(HELP_BACK), 17 | ) 18 | elif query.data == "HELP_source": 19 | await query.message.edit(SOURCE_TEXT, reply_markup=SOURCE_BUTTONS) 20 | elif query.data == "HELP_hurr": 21 | await query.edit_message_reply_markup(reply_markup=SOURCE_BUTTON) 22 | elif query.data == "HELP_BACK": 23 | await query.edit_message_text(START,reply_markup=IKM(MAIN)) 24 | 25 | 26 | 27 | 28 | except Exception as e: 29 | print(e) 30 | await query.message.forward(OWNER_ID) 31 | await query.message.reply(e) 32 | 33 | 34 | -------------------------------------------------------------------------------- /Chatgpt/modules/chatgpt.py: -------------------------------------------------------------------------------- 1 | # -----------CREDITS ----------- 2 | # telegram : @python_coderx 3 | # github : noob-mukesh 4 | from pyrogram import filters 5 | from pyrogram.types import InlineKeyboardMarkup 6 | import asyncio, time,requests 7 | from .. import Mukesh 8 | from config import * 9 | from ..modules.buttons import * 10 | from pyrogram.enums import ChatAction 11 | from MukeshAPI import api 12 | @Mukesh.on_message(filters.command(["chatgpt","ai","ask"], prefixes=["+", ".", "/", "-", "?", "$","#","&"])) 13 | async def chatgpt_chat(bot, message): 14 | 15 | if len(message.command) < 2: 16 | await message.reply_text( 17 | "Example:**\n\n`/chatgpt write simple website code using html css ,js?`") 18 | else: 19 | a = message.text.split(' ', 1)[1] 20 | 21 | # -----------CREDITS ----------- 22 | # telegram : @python_coderx 23 | # github : noob-mukesh 24 | 25 | 26 | try: 27 | response = api.gemini(a) 28 | await bot.send_chat_action(message.chat.id, ChatAction.TYPING) 29 | x=response["results"] 30 | 31 | await message.reply_text(f"{x}\n🎉ᴘᴏᴡᴇʀᴇᴅ ʙʏ @{Mukesh.username} ",reply_markup=InlineKeyboardMarkup(gpt_button),quote=True) 32 | 33 | 34 | except requests.exceptions.RequestException as e: 35 | pass 36 | 37 | -------------------------------------------------------------------------------- /Chatgpt/modules/help.py: -------------------------------------------------------------------------------- 1 | # -----------CREDITS ----------- 2 | # telegram : @mr_sukkun 3 | # github : noob-mukesh 4 | from pyrogram import filters 5 | from pyrogram.types import InlineKeyboardMarkup 6 | 7 | from .. import Mukesh 8 | from ..modules.buttons import * 9 | 10 | @Mukesh.on_message( 11 | filters.command( 12 | ["help", f"help@{Mukesh.username}"], prefixes=["+", ".", "/", "-", "?", "$"] 13 | ) 14 | ) 15 | async def help(_, m): 16 | await m.reply_photo( 17 | START_IMG, 18 | caption=f"{HELP}", 19 | reply_markup=InlineKeyboardMarkup(HELP_BACK),quote=True 20 | ) -------------------------------------------------------------------------------- /Chatgpt/modules/source.py: -------------------------------------------------------------------------------- 1 | # -----------CREDITS ----------- 2 | # telegram : @Mr_Sukkun 3 | # github : noob-mukesh 4 | from pyrogram import filters 5 | import asyncio 6 | from .. import Mukesh 7 | from ..modules.buttons import * 8 | 9 | 10 | @Mukesh.on_message( 11 | filters.command(["source", "repo"], prefixes=["+", ".", "/", "-", "?", "$"]) 12 | ) 13 | async def source(_, m): 14 | await m.reply_photo( 15 | START_IMG, 16 | caption=SOURCE_TEXT, 17 | reply_markup=SOURCE_BUTTONS 18 | ) -------------------------------------------------------------------------------- /Chatgpt/modules/start.py: -------------------------------------------------------------------------------- 1 | # -----------CREDITS ----------- 2 | # telegram : @Mr_Sukkun 3 | # github : noob-mukesh 4 | from pyrogram import filters 5 | import asyncio 6 | from .. import Mukesh 7 | from ..modules.buttons import * 8 | from Chatgpt.database import * 9 | from pyrogram.enums import ChatType, ParseMode 10 | 11 | @Mukesh.on_message(filters.command(["start", f"start@{Mukesh.username}"])) 12 | async def start(_, m): 13 | accha = await m.reply_text(f"{g}") 14 | await asyncio.sleep(0.2) 15 | await accha.edit("ᴘɪɴɢ ᴘᴏɴɢ ꜱᴛᴀʀᴛɪɴɢ..") 16 | await asyncio.sleep(0.2) 17 | await accha.delete() 18 | await asyncio.sleep(0.4) 19 | await m.reply_photo( 20 | START_IMG, caption=START, parse_mode=ParseMode.HTML, reply_markup=IKM(MAIN) 21 | ) 22 | 23 | try: 24 | if m.chat.type == ChatType.PRIVATE: 25 | await save_id(m.from_user.id) 26 | else: 27 | await chat_id(m.chat.id) 28 | except Exception as e: 29 | await m.reply(e) -------------------------------------------------------------------------------- /Chatgpt/modules/stats.py: -------------------------------------------------------------------------------- 1 | # -----------CREDITS ----------- 2 | # telegram : @Mr_Sukkun 3 | # github : noob-mukesh 4 | from pyrogram import filters 5 | import asyncio 6 | from .. import Mukesh 7 | from ..database import * 8 | 9 | 10 | @Mukesh.on_message(filters.command(["stats", f"tgt@{Mukesh.username}"])) 11 | async def stats(_, m): 12 | users = len(await get_served_users()) 13 | chats = len(await get_served_chats()) 14 | await m.reply(f""" ᴛᴏᴛᴀʟ ꜱᴛᴀᴛꜱ {Mukesh.mention}:\nᴜꜱᴇʀꜱ: {users}\nᴄʜᴀᴛ: {chats}""") -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | ENV DEBIAN_FRONTEND=noninteractive 4 | 5 | WORKDIR /app 6 | 7 | RUN apt-get update 8 | RUN echo y | apt-get install locales 9 | RUN echo y | apt install build-essential 10 | RUN apt -qq install -y --no-install-recommends \ 11 | curl \ 12 | git \ 13 | gnupg2 \ 14 | wget 15 | 16 | RUN set -ex; \ 17 | apt-get update \ 18 | && apt-get install -y --no-install-recommends \ 19 | busybox \ 20 | git \ 21 | python3 \ 22 | python3-dev \ 23 | python3-pip \ 24 | python3-lxml \ 25 | pv \ 26 | && apt-get autoclean \ 27 | && apt-get autoremove \ 28 | && rm -rf /var/lib/apt/lists/* 29 | 30 | RUN pip3 install setuptools wheel yarl multidict 31 | COPY requirements.txt . 32 | RUN pip3 install -r requirements.txt 33 | RUN dpkg-reconfigure locales 34 | COPY . /app 35 | 36 | CMD ["python3", "Chatgpt"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 ɴᴏᴏʙ - ᴍᴜᴋᴇsʜ 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 | Mukesh: python3 Chatgpt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ᴄʜᴀᴛɢᴘᴛ + ɢᴏᴏɢʟᴇ ʙᴀʀᴅ + Bʟᴀᴄᴋʙᴏx ᴀɪ 2 |

ᴀʙᴏᴜᴛ ᴍᴇ!

3 |
ᴀɴ ᴀᴅᴠᴀɴᴄᴇᴅ ᴛᴇʟᴇɢʀᴀᴍ ᴀɪ ʙᴏᴛ 
4 | 5 | 6 |
7 |

ɴᴏᴛᴇ📝

8 |
ᴘᴏᴡᴇʀғᴜʟ ᴛᴇʟᴇɢʀᴀᴍ ᴀɪ ʙᴏᴛ
  9 | ᴛʜɪꜱ ɪꜱ ᴄʜᴀᴛ ɢᴘᴛ  Q&ᴀ
 10 | ᴀɴꜱᴡᴇʀ Qᴜᴇꜱᴛɪᴏɴꜱ ʙᴀꜱᴇᴅ ᴏɴ ᴇxɪꜱᴛɪɴɢ ᴋɴᴏᴡʟᴇᴅɢᴇ.
 11 | ɢʀᴀᴍᴍᴀʀ ᴄᴏʀʀᴇᴄᴛɪᴏɴ
 12 | ᴄᴏʀʀᴇᴄᴛꜱ ꜱᴇɴᴛᴇɴᴄᴇꜱ ɪɴᴛᴏ ꜱᴛᴀɴᴅᴀʀᴅ ᴇɴɢʟɪꜱʜ.
 13 | ꜱᴜᴍᴍᴀʀɪᴢᴇ ꜰᴏʀ ᴀ 2ɴᴅ ɢʀᴀᴅᴇʀ
 14 | ᴛʀᴀɴꜱʟᴀᴛᴇꜱ ᴅɪꜰꜰɪᴄᴜʟᴛ ᴛᴇxᴛ ɪɴᴛᴏ ꜱɪᴍᴘʟᴇʀ ᴄᴏɴᴄᴇᴘᴛꜱ.
 15 | ɴᴀᴛᴜʀᴀʟ ʟᴀɴɢᴜᴀɢᴇ ᴛᴏ ᴏᴘᴇɴᴀɪ ᴀᴘɪ
 16 | ᴄʀᴇᴀᴛᴇ ᴄᴏᴅᴇ ᴛᴏ ᴄᴀʟʟ ᴛᴏ ᴛʜᴇ ᴏᴘᴇɴᴀɪ ᴀᴘɪ ᴜꜱɪɴɢ ᴀ ɴᴀᴛᴜʀᴀʟ ʟᴀɴɢᴜᴀɢᴇ ɪɴꜱᴛʀᴜᴄᴛɪᴏɴ.
 17 | ᴛᴇxᴛ ᴛᴏ ᴄᴏᴍᴍᴀɴᴅ
 18 | ᴛʀᴀɴꜱʟᴀᴛᴇ ᴛᴇxᴛ ɪɴᴛᴏ ᴘʀᴏɢʀᴀᴍᴍᴀᴛɪᴄ ᴄᴏᴍᴍᴀɴᴅꜱ.
 19 | ᴇɴɢʟɪꜱʜ ᴛᴏ ᴏᴛʜᴇʀ ʟᴀɴɢᴜᴀɢᴇꜱ
 20 | ᴛʀᴀɴꜱʟᴀᴛᴇꜱ ᴇɴɢʟɪꜱʜ ᴛᴇxᴛ ɪɴᴛᴏ ꜰʀᴇɴᴄʜ, ꜱᴘᴀɴɪꜱʜ ᴀɴᴅ ᴊᴀᴘᴀɴᴇꜱᴇ.
 21 | ɴᴀᴛᴜʀᴀʟ ʟᴀɴɢᴜᴀɢᴇ ᴛᴏ ꜱᴛʀɪᴘᴇ ᴀᴘɪ
 22 | ᴄʀᴇᴀᴛᴇ ᴄᴏᴅᴇ ᴛᴏ ᴄᴀʟʟ ᴛʜᴇ ꜱᴛʀɪᴘᴇ ᴀᴘɪ ᴜꜱɪɴɢ ɴᴀᴛᴜʀᴀʟ ʟᴀɴɢᴜᴀɢᴇ.
 23 | ꜱQʟ ᴛʀᴀɴꜱʟᴀᴛᴇ
 24 | ᴛʀᴀɴꜱʟᴀᴛᴇ ɴᴀᴛᴜʀᴀʟ ʟᴀɴɢᴜᴀɢᴇ ᴛᴏ ꜱQʟ Qᴜᴇʀɪᴇꜱ.
 25 | ᴘᴀʀꜱᴇ ᴜɴꜱᴛʀᴜᴄᴛᴜʀᴇᴅ ᴅᴀᴛᴀ
 26 | ᴄʀᴇᴀᴛᴇ ᴛᴀʙʟᴇꜱ ꜰʀᴏᴍ ʟᴏɴɢ ꜰᴏʀᴍ ᴛᴇxᴛ
 27 | ᴄʟᴀꜱꜱɪꜰɪᴄᴀᴛɪᴏɴ
 28 | ᴄʟᴀꜱꜱɪꜰʏ ɪᴛᴇᴍꜱ ɪɴᴛᴏ ᴄᴀᴛᴇɢᴏʀɪᴇꜱ ᴠɪᴀ ᴇxᴀᴍᴘʟᴇ.
 29 | ᴘʏᴛʜᴏɴ ᴛᴏ ɴᴀᴛᴜʀᴀʟ ʟᴀɴɢᴜᴀɢᴇ
 30 | ᴇxᴘʟᴀɪɴ ᴀ ᴘɪᴇᴄᴇ ᴏꜰ ᴘʏᴛʜᴏɴ ᴄᴏᴅᴇ ɪɴ ʜᴜᴍᴀɴ ᴜɴᴅᴇʀꜱᴛᴀɴᴅᴀʙʟᴇ ʟᴀɴɢᴜᴀɢᴇ.
 31 | ᴍᴏᴠɪᴇ ᴛᴏ ᴇᴍᴏᴊɪ
 32 | ᴄᴏɴᴠᴇʀᴛ ᴍᴏᴠɪᴇ ᴛɪᴛʟᴇꜱ ɪɴᴛᴏ ᴇᴍᴏᴊɪ.
 33 | ᴄᴀʟᴄᴜʟᴀᴛᴇ ᴛɪᴍᴇ ᴄᴏᴍᴘʟᴇxɪᴛʏ
 34 | ꜰɪɴᴅ ᴛʜᴇ ᴛɪᴍᴇ ᴄᴏᴍᴘʟᴇxɪᴛʏ ᴏꜰ ᴀ ꜰᴜɴᴄᴛɪᴏɴ.
 35 | ᴛʀᴀɴꜱʟᴀᴛᴇ ᴘʀᴏɢʀᴀᴍᴍɪɴɢ ʟᴀɴɢᴜᴀɢᴇꜱ
 36 | ᴛʀᴀɴꜱʟᴀᴛᴇ ꜰʀᴏᴍ ᴏɴᴇ ᴘʀᴏɢʀᴀᴍᴍɪɴɢ ʟᴀɴɢᴜᴀɢᴇ ᴛᴏ ᴀɴᴏᴛʜᴇʀ
 37 | ᴀᴅᴠᴀɴᴄᴇᴅ ᴛᴡᴇᴇᴛ ᴄʟᴀꜱꜱɪꜰɪᴇʀ
 38 | ᴀᴅᴠᴀɴᴄᴇᴅ ꜱᴇɴᴛɪᴍᴇɴᴛ ᴅᴇᴛᴇᴄᴛɪᴏɴ ꜰᴏʀ ᴀ ᴘɪᴇᴄᴇ ᴏꜰ ᴛᴇxᴛ.
 39 | ᴇxᴘʟᴀɪɴ ᴄᴏᴅᴇ
 40 | ᴇxᴘʟᴀɪɴ ᴀ ᴄᴏᴍᴘʟɪᴄᴀᴛᴇᴅ ᴘɪᴇᴄᴇ ᴏꜰ ᴄᴏᴅᴇ.
 41 | ᴋᴇʏᴡᴏʀᴅꜱ
 42 | ᴇxᴛʀᴀᴄᴛ ᴋᴇʏᴡᴏʀᴅꜱ ꜰʀᴏᴍ ᴀ ʙʟᴏᴄᴋ ᴏꜰ ᴛᴇxᴛ.
 43 | ꜰᴀᴄᴛᴜᴀʟ ᴀɴꜱᴡᴇʀɪɴɢ
 44 | ɢᴜɪᴅᴇ ᴛʜᴇ ᴍᴏᴅᴇʟ ᴛᴏᴡᴀʀᴅꜱ ꜰᴀᴄᴛᴜᴀʟ ᴀɴꜱᴡᴇʀɪɴɢ ʙʏ ꜱʜᴏᴡɪɴɢ ɪᴛ ʜᴏᴡ ᴛᴏ ʀᴇꜱᴘᴏɴᴅ 
 45 | ᴛᴏ Qᴜᴇꜱᴛɪᴏɴꜱ ᴛʜᴀᴛ ꜰᴀʟʟ ᴏᴜᴛꜱɪᴅᴇ ɪᴛꜱ ᴋɴᴏᴡʟᴇᴅɢᴇ ʙᴀꜱᴇ.
 46 | ᴜꜱɪɴɢ ᴀ '?' ᴛᴏ ɪɴᴅɪᴄᴀᴛᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ᴛᴏ ᴡᴏʀᴅꜱ ᴀɴᴅ ᴘʜʀᴀꜱᴇꜱ 
 47 | ᴛʜᴀᴛ ɪᴛ ᴅᴏᴇꜱɴ'ᴛ ᴋɴᴏᴡ ᴘʀᴏᴠɪᴅᴇꜱ ᴀ ɴᴀᴛᴜʀᴀʟ ʀᴇꜱᴘᴏɴꜱᴇ ᴛʜᴀᴛ
 48 | ꜱᴇᴇᴍꜱ ᴛᴏ ᴡᴏʀᴋ ʙᴇᴛᴛᴇʀ ᴛʜᴀɴ ᴍᴏʀᴇ ᴀʙꜱᴛʀᴀᴄᴛ ʀᴇᴘʟɪᴇꜱ.
 49 | ᴀᴅ ꜰʀᴏᴍ ᴘʀᴏᴅᴜᴄᴛ ᴅᴇꜱᴄʀɪᴘᴛɪᴏɴ
 50 | ᴛᴜʀɴ ᴀ ᴘʀᴏᴅᴜᴄᴛ ᴅᴇꜱᴄʀɪᴘᴛɪᴏɴ ɪɴᴛᴏ ᴀᴅ ᴄᴏᴘʏ.
 51 | ᴘʀᴏᴅᴜᴄᴛ ɴᴀᴍᴇ ɢᴇɴᴇʀᴀᴛᴏʀ
 52 | ᴄʀᴇᴀᴛᴇ ᴘʀᴏᴅᴜᴄᴛ ɴᴀᴍᴇꜱ ꜰʀᴏᴍ ᴇxᴀᴍᴘʟᴇꜱ ᴡᴏʀᴅꜱ. ɪɴꜰʟᴜᴇɴᴄᴇᴅ ʙʏ ᴀ ᴄᴏᴍᴍᴜɴɪᴛʏ ᴘʀᴏᴍᴘᴛ.
 53 | ᴛʟ;ᴅʀ ꜱᴜᴍᴍᴀʀɪᴢᴀᴛɪᴏɴ
 54 | ꜱᴜᴍᴍᴀʀɪᴢᴇ ᴛᴇxᴛ ʙʏ ᴀᴅᴅɪɴɢ ᴀ 'ᴛʟ;ᴅʀ:' ᴛᴏ ᴛʜᴇ ᴇɴᴅ ᴏꜰ ᴀ ᴛᴇxᴛ ᴘᴀꜱꜱᴀɢᴇ.
 55 | ɪᴛ ꜱʜᴏᴡꜱ ᴛʜᴀᴛ ᴛʜᴇ ᴀᴘɪ ᴜɴᴅᴇʀꜱᴛᴀɴᴅꜱ ʜᴏᴡ ᴛᴏ ᴘᴇʀꜰᴏʀᴍ 
 56 | ᴀ ɴᴜᴍʙᴇʀ ᴏꜰ ᴛᴀꜱᴋꜱ ᴡɪᴛʜ ɴᴏ ɪɴꜱᴛʀᴜᴄᴛɪᴏɴꜱ.
 57 | ᴘʏᴛʜᴏɴ ʙᴜɢ ꜰɪxᴇʀ
 58 | ꜰɪɴᴅ ᴀɴᴅ ꜰɪx ʙᴜɢꜱ ɪɴ ꜱᴏᴜʀᴄᴇ ᴄᴏᴅᴇ.
 59 | ꜱᴘʀᴇᴀᴅꜱʜᴇᴇᴛ ᴄʀᴇᴀᴛᴏʀ
 60 | ᴄʀᴇᴀᴛᴇ ꜱᴘʀᴇᴀᴅꜱʜᴇᴇᴛꜱ ᴏꜰ ᴠᴀʀɪᴏᴜꜱ ᴋɪɴᴅꜱ ᴏꜰ ᴅᴀᴛᴀ. ɪᴛ'ꜱ ᴀ ʟᴏɴɢ ᴘʀᴏᴍᴘᴛ
 61 | ʙᴜᴛ ᴠᴇʀʏ ᴠᴇʀꜱᴀᴛɪʟᴇ. ᴏᴜᴛᴘᴜᴛ ᴄᴀɴ ʙᴇ ᴄᴏᴘʏ+ᴘᴀꜱᴛᴇᴅ ɪɴᴛᴏ ᴀ ᴛᴇxᴛ
 62 | ꜰɪʟᴇ ᴀɴᴅ ꜱᴀᴠᴇᴅ ᴀꜱ ᴀ .ᴄꜱᴠ ᴡɪᴛʜ ᴘɪᴘᴇ ꜱᴇᴘᴀʀᴀᴛᴏʀꜱ.
 63 | ᴊᴀᴠᴀꜱᴄʀɪᴘᴛ ʜᴇʟᴘᴇʀ ᴄʜᴀᴛʙᴏᴛ
 64 | ᴍᴇꜱꜱᴀɢᴇ-ꜱᴛʏʟᴇ ʙᴏᴛ ᴛʜᴀᴛ ᴀɴꜱᴡᴇʀꜱ ᴊᴀᴠᴀꜱᴄʀɪᴘᴛ Qᴜᴇꜱᴛɪᴏɴꜱ
 65 | ᴍʟ/ᴀɪ ʟᴀɴɢᴜᴀɢᴇ ᴍᴏᴅᴇʟ ᴛᴜᴛᴏʀ
 66 | ʙᴏᴛ ᴛʜᴀᴛ ᴀɴꜱᴡᴇʀꜱ Qᴜᴇꜱᴛɪᴏɴꜱ ᴀʙᴏᴜᴛ ʟᴀɴɢᴜᴀɢᴇ ᴍᴏᴅᴇʟꜱ
 67 | ꜱᴄɪᴇɴᴄᴇ ꜰɪᴄᴛɪᴏɴ ʙᴏᴏᴋ ʟɪꜱᴛ ᴍᴀᴋᴇʀ
 68 | ᴄʀᴇᴀᴛᴇ ᴀ ʟɪꜱᴛ ᴏꜰ ɪᴛᴇᴍꜱ ꜰᴏʀ ᴀ ɢɪᴠᴇɴ ᴛᴏᴘɪᴄ.
 69 | ᴛᴡᴇᴇᴛ ᴄʟᴀꜱꜱɪꜰɪᴇʀ
 70 | ʙᴀꜱɪᴄ ꜱᴇɴᴛɪᴍᴇɴᴛ ᴅᴇᴛᴇᴄᴛɪᴏɴ ꜰᴏʀ ᴀ ᴘɪᴇᴄᴇ ᴏꜰ ᴛᴇxᴛ.
 71 | ᴀɪʀᴘᴏʀᴛ ᴄᴏᴅᴇ ᴇxᴛʀᴀᴄᴛᴏʀ
 72 | ᴇxᴛʀᴀᴄᴛ ᴀɪʀᴘᴏʀᴛ ᴄᴏᴅᴇꜱ ꜰʀᴏᴍ ᴛᴇxᴛ.
 73 | ꜱQʟ ʀᴇQᴜᴇꜱᴛ
 74 | ᴄʀᴇᴀᴛᴇ ꜱɪᴍᴘʟᴇ ꜱQʟ Qᴜᴇʀɪᴇꜱ.
 75 | ᴇxᴛʀᴀᴄᴛ ᴄᴏɴᴛᴀᴄᴛ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ
 76 | ᴇxᴛʀᴀᴄᴛ ᴄᴏɴᴛᴀᴄᴛ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ꜰʀᴏᴍ ᴀ ʙʟᴏᴄᴋ ᴏꜰ ᴛᴇxᴛ.
 77 | ᴊᴀᴠᴀꜱᴄʀɪᴘᴛ ᴛᴏ ᴘʏᴛʜᴏɴ
 78 | ᴄᴏɴᴠᴇʀᴛ ꜱɪᴍᴘʟᴇ ᴊᴀᴠᴀꜱᴄʀɪᴘᴛ ᴇxᴘʀᴇꜱꜱɪᴏɴꜱ ɪɴᴛᴏ ᴘʏᴛʜᴏɴ.
 79 | ꜰʀɪᴇɴᴅ ᴄʜᴀᴛ
 80 | ᴇᴍᴜʟᴀᴛᴇ ᴀ ᴛᴇxᴛ ᴍᴇꜱꜱᴀɢᴇ ᴄᴏɴᴠᴇʀꜱᴀᴛɪᴏɴ.
 81 | ᴍᴏᴏᴅ ᴛᴏ ᴄᴏʟᴏʀ
 82 | ᴛᴜʀɴ ᴀ ᴛᴇxᴛ ᴅᴇꜱᴄʀɪᴘᴛɪᴏɴ ɪɴᴛᴏ ᴀ ᴄᴏʟᴏʀ.
 83 | ᴡʀɪᴛᴇ ᴀ ᴘʏᴛʜᴏɴ ᴅᴏᴄꜱᴛʀɪɴɢ
 84 | ᴀɴ ᴇxᴀᴍᴘʟᴇ ᴏꜰ ʜᴏᴡ ᴛᴏ ᴄʀᴇᴀᴛᴇ ᴀ ᴅᴏᴄꜱᴛʀɪɴɢ ꜰᴏʀ ᴀ ɢɪᴠᴇɴ ᴘʏᴛʜᴏɴ ꜰᴜɴᴄᴛɪᴏɴ.
 85 | ᴡᴇ ꜱᴘᴇᴄɪꜰʏ ᴛʜᴇ ᴘʏᴛʜᴏɴ ᴠᴇʀꜱɪᴏɴ, ᴘᴀꜱᴛᴇ ɪɴ ᴛʜᴇ ᴄᴏᴅᴇ, 
 86 | ᴀɴᴅ ᴛʜᴇɴ ᴀꜱᴋ ᴡɪᴛʜɪɴ ᴀ ᴄᴏᴍᴍᴇɴᴛ ꜰᴏʀ ᴀ ᴅᴏᴄꜱᴛʀɪɴɢ, 
 87 | ᴀɴᴅ ɢɪᴠᴇ ᴀ ᴄʜᴀʀᴀᴄᴛᴇʀɪꜱᴛɪᴄ ʙᴇɢɪɴɴɪɴɢ ᴏꜰ. ᴀ ᴅᴏᴄꜱᴛʀɪɴɢ
 88 | 
89 |
90 | ━━━━━━━━━━━━━━━━━━━━━━ 91 | ━━━━━━━━━━━━━━━━━━━━━━ 92 |

ʜᴏᴡ ᴛᴏ ᴅᴇᴘʟᴏʏ

93 |

YouTube Video Views 94 |

95 | ━━━━━━━━━━━━━━━━━━━━ 96 | 97 |

ᴅᴇᴘʟᴏʏ ᴛᴏ ʜᴇʀᴜᴋᴏ🚀

98 |
ᴇɴᴛᴇʀ ᴛʜᴇ ʀᴇǫᴜɪʀᴇᴅ ᴠᴀʀs ɪɴ ᴛʜᴇ ʜᴇʀᴜᴋᴏ.
99 |

100 | 101 |

102 | ─「 ᴅᴇᴩʟᴏʏ ᴏɴ ᴠᴘs/ʟᴏᴄᴀʟ 」─ 103 |

104 | 105 |
106 |

107 | - ᴠᴘs/ʟᴏᴄᴀʟ ᴅᴇᴘʟᴏʏᴍᴇɴᴛ ᴍᴇᴛʜᴏᴅ 108 |

109 | 110 | - Get your [Necessary Variables](https://github.com/Noob-mukesh/Chatgpt-bot/blob/main/config.py) 111 | - Upgrade and Update by : 112 | `sudo apt-get update && sudo apt-get upgrade -y` 113 | - Install required packages by : 114 | `sudo apt-get install python3-pip -y` 115 | - Install pip by : 116 | `sudo pip3 install -U pip` 117 | - Clone the repository by : 118 | `git clone https://github.com/Noob-Mukesh/Chatgpt-bot` 119 | - Install/Upgrade setuptools by : 120 | `pip3 install --upgrade pip setuptools` 121 | - Install requirements by : 122 | `pip3 install -U -r requirements.txt` 123 | - Fill your variables in config by : 124 | `vi config.py` 125 | 126 | Press `I` on the keyboard for editing config 127 | 128 | Press `Ctrl+C` when you're done with editing config and `:wq` to save the config 129 | - Install tmux to keep running your bot when you close the terminal by : 130 | `sudo apt install tmux && tmux` 131 | - Finally run the bot by : 132 | `python3 -m Chatgpt` 133 | - For getting out from tmux session 134 | 135 | Press `Ctrl+b` and then `d`
136 | 137 | 138 | sᴀᴍᴘʟᴇ ʙᴏᴛ ɪs ɢɪᴠᴇɴ ʙᴇʟᴏᴡ, ʏᴏᴜ ᴄᴀɴ ᴄʜᴇᴀᴋ ᴛʜᴀᴛ. 139 |
140 | sᴀᴍᴘʟᴇ ʙᴏᴛ✨ 141 | ᴀʟʟ ᴛʜᴇ ᴄᴜsᴛᴏᴍɪsᴀᴛɪᴏɴs ʟɪᴋᴇ ᴅɪғғᴇʀᴇɴᴛ sᴛᴀʀᴛ ɪᴍᴀɢᴇs ᴀɴᴅ ᴅɪғғᴇʀᴇɴᴛ sᴛɪᴄᴋᴇʀs ᴀʀᴇ ᴀᴠᴀɪʟᴀʙʟᴇ. ᴢsᴛ ᴄʜᴇᴀᴋ ᴛʜᴇ ᴠᴀʀs ᴀɴᴅ ғᴏʀᴋ ᴛʜᴇ ʀᴇᴘᴏsɪᴛᴏʀʏ. 142 |

143 |
144 | 145 | 146 | ### sᴜᴘᴘᴏʀᴛ 147 | 148 |

149 | 150 |

151 | 152 | 153 | ### ᴄʀᴇᴅɪᴛs 154 | # 155 | [─╼⃝𖠁 ᴍᴜᴋᴇsʜ 𖠁⃝╾─•](https://telegram.me/legend_coder)

156 | [­ 𝔼𝕣𝕖𝕟](https://telegram.me/WH0907)

157 | 158 |

ᴅᴏɴ'ᴛ ғᴏʀɢᴇᴛ ᴛᴏ ɢɪᴠᴇ ᴛʜᴇ ꜱᴛᴀʀ

159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "Chat-Gpt", 4 | "description": "A Telegram open-ai Chatgpt bot.", 5 | "logo": "https://te.legra.ph/file/9fa2101b77407dbec7d31.jpg", 6 | "keywords": [ 7 | "telegram", "chatgpt", 8 | "python", 9 | "pyrogram", 10 | "Noob-Mukesh" 11 | ], 12 | "stack": "heroku-20", 13 | "addons": [ 14 | { 15 | "plan": "heroku-postgresql", 16 | "options": { 17 | "version": "15" 18 | } 19 | } 20 | ], 21 | "env": { 22 | "BOT_TOKEN": { "description": "telegram bot token here", 23 | "required": true 24 | }, 25 | "OWNER_ID": { 26 | "description": "Owner id OF TELEGRAM ", 27 | "required": true 28 | }, 29 | "SUPPORT_GRP": { 30 | "description": "Your Support Group without @", 31 | "required": true 32 | }, 33 | "STKR": { 34 | "description": "Sticker for start", 35 | "required": true 36 | }, 37 | "START_IMG": { 38 | "description": "Start Image For Bot.", 39 | "required": true 40 | }, 41 | "UPDATE_CHNL": { 42 | "description": "Your Updates Channel without @", 43 | "required": true 44 | }, 45 | "API_ID": { "description": "telegram api id here", 46 | "required": true 47 | }, 48 | "API_HASH": { 49 | "description": "telegram api hash here", 50 | "required": true 51 | }, 52 | "MONGO_DB_URI":{ 53 | "description":"enter mongo url here", 54 | "required":true 55 | }}, 56 | "repository": "https://github.com/noob-mukesh/Chatgpt-bot" 57 | } 58 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | 2 | from flask import Flask 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def hello_world(): 7 | return ' I Am alive' 8 | 9 | if __name__ == "__main__": 10 | app.run() -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | import os 2 | API_ID :int = int(os.environ.get("API_ID", None)) 3 | API_HASH :str = os.environ.get("API_HASH", "") 4 | BOT_TOKEN :str= os.environ.get("BOT_TOKEN", "") 5 | UPDATE_CHNL :str = os.environ.get("UPDATE_CHNL", "mr_sukkun") 6 | SUPPORT_GRP :str = os.environ.get("SUPPORT_GRP", "the_support_chat") 7 | START_IMG :str = os.environ.get( 8 | "START_IMG", "https://graph.org/file/d4412c7b411ca8da9e177.jpg" 9 | ) 10 | 11 | MONGO_DB_URI :str = os.environ.get( 12 | "MONGO_DB_URI", 13 | "", 14 | ) 15 | OWNER_ID :int= os.environ.get("OWNER_ID", 6728038801) 16 | 17 | -------------------------------------------------------------------------------- /heruko.yml: -------------------------------------------------------------------------------- 1 | build: 2 | docker: 3 | worker: Dockerfile -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | aiofiles 2 | pyrogram 3 | requests 4 | dnspython 5 | # tgcrypto 6 | asyncio 7 | pymongo 8 | motor 9 | pillow 10 | numpy 11 | MukeshAPI 12 | lxml[html_clean] 13 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.12.0 2 | --------------------------------------------------------------------------------