diff --git a/app.json b/app.json index d4861d3a..737090ca 100644 --- a/app.json +++ b/app.json @@ -58,12 +58,12 @@ }, "START_MESSAGE": { "description": "Optional: start message of bot, use HTML parsemode format", - "value": "Hello {mention}\n\nI Can Store Private Files In Specified Channel And Other Users Can Access It From Special Link.", + "value": "ʜᴇʟʟᴏ {first}\n\nɪ ᴀᴍ ᴀ ꜰɪʟᴇ ꜱᴛᴏʀᴇʀ ʙᴏᴛ ᴏꜰ ɪᴀꜱ ᴍᴏᴠɪᴇꜱ & ꜱᴇʀɪᴇꜱ, ɪ ꜱᴛᴏʀᴇ ꜰɪʟᴇꜱ ɪɴꜱɪᴅᴇ ᴍᴇ ᴀɴᴅ ʏᴏᴜ ᴄᴀɴ ɢᴇᴛ ᴛʜᴇᴍ ʙʏ ꜱᴏʟᴠɪɴɢ ꜱʜᴏʀᴛᴇɴᴇʀ ꜰʀᴏᴍ ᴏᴜʀ ᴄʜᴀɴɴᴇʟ!\n» @IAS_MOVIESANDSERIES", "required": false }, "FORCE_SUB_MESSAGE": { "description": "Optional: Force Sub message of bot, use HTML parsemode format", - "value": "Hello {mention}\n\nYou Need To Join In My Channel To Use Me\n\nKindly Please Join Channel", + "value": "𝐒𝐨𝐫𝐫𝐲 {first} 𝐲𝐨𝐮 𝐡𝐚𝐯𝐞 𝐭𝐨 𝐣𝐨𝐢𝐧 𝐦𝐲 𝐜𝐡𝐚𝐧𝐧𝐞𝐥𝐬 𝐟𝐢𝐫𝐬𝐭 𝐭𝐨 𝐚𝐜𝐜𝐞𝐬𝐬 𝐟𝐢𝐥𝐞𝐬...\n\n 𝐒𝐨 𝐩𝐥𝐞𝐚𝐬𝐞 𝐣𝐨𝐢𝐧 𝐦𝐲 𝐜𝐡𝐚𝐧𝐧𝐞𝐥𝐬 𝐟𝐢𝐫𝐬𝐭 𝐚𝐧𝐝 𝐜𝐥𝐢𝐜𝐤 𝐨𝐧 “𝐍𝐨𝐰 𝐂𝐥𝐢𝐜𝐤 𝐡𝐞𝐫𝐞” 𝐛𝐮𝐭𝐭𝐨𝐧...!", "required": false }, "ADMINS": { @@ -78,7 +78,7 @@ }, "SECONDS": { "description": "auto delete in seconds", - "value": "600", + "value": "900", "required": false } }, diff --git a/config.py b/config.py index 1328158a..a5b91ca5 100644 --- a/config.py +++ b/config.py @@ -15,22 +15,22 @@ TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "") -APP_ID = int(os.environ.get("APP_ID", "")) -API_HASH = os.environ.get("API_HASH", "") +APP_ID = int(os.environ.get("APP_ID", "1949389")) +API_HASH = os.environ.get("API_HASH", "b6866140cf6064d6c27de44915015879") -OWNER = os.environ.get("OWNER", "") #Owner username -OWNER_ID = int(os.environ.get("OWNER_ID", "")) #Owner user id +OWNER = os.environ.get("OWNER", "@Minato2op") #Owner username +OWNER_ID = int(os.environ.get("OWNER_ID", "1308086294")) #Owner user id DB_URL = os.environ.get("DB_URL", "") -DB_NAME = os.environ.get("DB_NAME", "madflixbotz") +DB_NAME = os.environ.get("DB_NAME", "") -CHANNEL_ID = int(os.environ.get("CHANNEL_ID", "")) -FORCE_SUB_CHANNEL = int(os.environ.get("FORCE_SUB_CHANNEL", "0")) -FORCE_SUB_CHANNEL2 = int(os.environ.get("FORCE_SUB_CHANNEL2", "0")) +CHANNEL_ID = int(os.environ.get("CHANNEL_ID", "-1001766230079")) +FORCE_SUB_CHANNEL = int(os.environ.get("FORCE_SUB_CHANNEL", "-1002145190977")) +FORCE_SUB_CHANNEL2 = int(os.environ.get("FORCE_SUB_CHANNEL2", "-1002241322609")) -SECONDS = int(os.getenv("SECONDS", "600")) # auto delete in seconds +SECONDS = int(os.getenv("SECONDS", "900")) # auto delete in seconds @@ -40,17 +40,17 @@ -START_MSG = os.environ.get("START_MESSAGE", "Hello {first}\n\nI can store private files in Specified Channel and other users can access it from special link.") +START_MSG = os.environ.get("START_MESSAGE", "ʜᴇʟʟᴏ {first}\n\nɪ ᴀᴍ ᴀ ꜰɪʟᴇ ꜱᴛᴏʀᴇʀ ʙᴏᴛ ᴏꜰ ɪᴀꜱ ᴍᴏᴠɪᴇꜱ & ꜱᴇʀɪᴇꜱ, ɪ ꜱᴛᴏʀᴇ ꜰɪʟᴇꜱ ɪɴꜱɪᴅᴇ ᴍᴇ ᴀɴᴅ ʏᴏᴜ ᴄᴀɴ ɢᴇᴛ ᴛʜᴇᴍ ʙʏ ꜱᴏʟᴠɪɴɢ ꜱʜᴏʀᴛᴇɴᴇʀ ꜰʀᴏᴍ ᴏᴜʀ ᴄʜᴀɴɴᴇʟ!\n» @IAS_MOVIESANDSERIES") try: - ADMINS=[7085541484] + ADMINS=[1308086294, 2006429070] for x in (os.environ.get("ADMINS", "5115691197 6273945163 6103092779 5231212075").split()): ADMINS.append(int(x)) except ValueError: raise Exception("Your Admins list does not contain valid integers.") -FORCE_MSG = os.environ.get("FORCE_SUB_MESSAGE", "Hello {first}\n\nYou need to join in my Channel/Group to use me\n\nKindly Please join Channel") +FORCE_MSG = os.environ.get("FORCE_SUB_MESSAGE", "𝐒𝐨𝐫𝐫𝐲 {first} 𝐲𝐨𝐮 𝐡𝐚𝐯𝐞 𝐭𝐨 𝐣𝐨𝐢𝐧 𝐦𝐲 𝐜𝐡𝐚𝐧𝐧𝐞𝐥𝐬 𝐟𝐢𝐫𝐬𝐭 𝐭𝐨 𝐚𝐜𝐜𝐞𝐬𝐬 𝐟𝐢𝐥𝐞𝐬...\n\n 𝐒𝐨 𝐩𝐥𝐞𝐚𝐬𝐞 𝐣𝐨𝐢𝐧 𝐦𝐲 𝐜𝐡𝐚𝐧𝐧𝐞𝐥𝐬 𝐟𝐢𝐫𝐬𝐭 𝐚𝐧𝐝 𝐜𝐥𝐢𝐜𝐤 𝐨𝐧 “Try Again” 𝐛𝐮𝐭𝐭𝐨𝐧...!") CUSTOM_CAPTION = os.environ.get("CUSTOM_CAPTION", None) @@ -59,10 +59,10 @@ DISABLE_CHANNEL_BUTTON = os.environ.get("DISABLE_CHANNEL_BUTTON", None) == 'True' BOT_STATS_TEXT = "BOT UPTIME\n{uptime}" -USER_REPLY_TEXT = "❌Don't send me messages directly I'm only File Share bot !" +USER_REPLY_TEXT = "Nigha! You Ain't My Owner!!\n\n» My Owner : @Minato2op" ADMINS.append(OWNER_ID) -ADMINS.append(7085541484) +ADMINS.append(1308086294) LOG_FILE_NAME = "filesharingbot.txt" diff --git a/helper_func.py b/helper_func.py index b0ff4425..978fc6d3 100644 --- a/helper_func.py +++ b/helper_func.py @@ -113,7 +113,7 @@ async def get_message_id(client, message): elif message.forward_sender_name: return 0 elif message.text: - pattern = "https://t.me/(?:c/)?(.*)/(\d+)" + pattern = "https://telegram.me/(?:c/)?(.*)/(\\d+)" matches = re.match(pattern,message.text) if not matches: return 0 diff --git a/main.py b/main.py index 1ff905fd..a7275c47 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,7 @@ +import pyrogram.utils + +pyrogram.utils.MIN_CHANNEL_ID = -1002241322609 + from bot import Bot Bot().run() diff --git a/plugins/cbb.py b/plugins/cbb.py index a9b51958..984a6610 100644 --- a/plugins/cbb.py +++ b/plugins/cbb.py @@ -19,7 +19,7 @@ async def cb_handler(client: Bot, query: CallbackQuery): data = query.data if data == "about": await query.message.edit_text( - text = f"🤖 My Name : File Sharing Bot \n📝 Language : Python 3 \n📚 Library : Pyrogram {__version__} \n🚀 Server : Heroku \n📢 Channel : Madflix Botz \n🧑‍💻 Developer : Jishu Developer", + text = f"○ ᴏᴡɴᴇʀ : ᴍɪɴᴀᴛᴏ-ꜱᴀᴍᴀ\n○ ᴄʜᴀɴɴᴇʟ : ɪᴀꜱ: ᴍᴏᴠɪᴇꜱᴀɴᴅꜱᴇʀɪᴇꜱ\n○ ʙᴀᴄᴋᴜᴘ : ɪᴀꜱ ᴍ&ꜱ ʙᴀᴄᴋᴜᴘ\n○ ɢʀᴏᴜᴘ : ɪᴀꜱ ᴄʜᴀᴛ ɢʀᴏᴜᴘ", disable_web_page_preview = True, reply_markup = InlineKeyboardMarkup( [ diff --git a/plugins/channel_post.py b/plugins/channel_post.py index cb8cd180..d09cb643 100644 --- a/plugins/channel_post.py +++ b/plugins/channel_post.py @@ -32,7 +32,7 @@ async def channel_post(client: Client, message: Message): converted_id = post_message.id * abs(client.db_channel.id) string = f"get-{converted_id}" base64_string = await encode(string) - link = f"https://t.me/{client.username}?start={base64_string}" + link = f"https://telegram.me/{client.username}?start={base64_string}" reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("🔁 Share URL", url=f'https://telegram.me/share/url?url={link}')]]) @@ -54,7 +54,7 @@ async def new_post(client: Client, message: Message): converted_id = message.id * abs(client.db_channel.id) string = f"get-{converted_id}" base64_string = await encode(string) - link = f"https://t.me/{client.username}?start={base64_string}" + link = f"https://telegram.me/{client.username}?start={base64_string}" reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("🔁 Share URL", url=f'https://telegram.me/share/url?url={link}')]]) try: await message.edit_reply_markup(reply_markup) @@ -71,4 +71,4 @@ async def new_post(client: Client, message: Message): # Don't Remove Credit 🥺 # Telegram Channel @Madflix_Bots # Backup Channel @JishuBotz -# Developer @JishuDeveloper \ No newline at end of file +# Developer @JishuDeveloper diff --git a/plugins/link_generator.py b/plugins/link_generator.py index cd29430a..843c5d3d 100644 --- a/plugins/link_generator.py +++ b/plugins/link_generator.py @@ -43,7 +43,7 @@ async def batch(client: Client, message: Message): string = f"get-{f_msg_id * abs(client.db_channel.id)}-{s_msg_id * abs(client.db_channel.id)}" base64_string = await encode(string) - link = f"https://t.me/{client.username}?start={base64_string}" + link = f"https://telegram.me/{client.username}?start={base64_string}" reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("🔁 Share URL", url=f'https://telegram.me/share/url?url={link}')]]) await second_message.reply_text(f"Here is your link\n\n{link}", quote=True, reply_markup=reply_markup) @@ -65,7 +65,7 @@ async def link_generator(client: Client, message: Message): continue base64_string = await encode(f"get-{msg_id * abs(client.db_channel.id)}") - link = f"https://t.me/{client.username}?start={base64_string}" + link = f"https://telegram.me/{client.username}?start={base64_string}" reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("🔁 Share URL", url=f'https://telegram.me/share/url?url={link}')]]) await channel_message.reply_text(f"Here is your link\n\n{link}", quote=True, reply_markup=reply_markup) @@ -79,4 +79,4 @@ async def link_generator(client: Client, message: Message): # Don't Remove Credit 🥺 # Telegram Channel @Madflix_Bots # Backup Channel @JishuBotz -# Developer @JishuDeveloper \ No newline at end of file +# Developer @JishuDeveloper diff --git a/plugins/start.py b/plugins/start.py index 19531621..1f4c53cd 100644 --- a/plugins/start.py +++ b/plugins/start.py @@ -21,7 +21,7 @@ # add time im seconds for waitingwaiting before delete # 1 minutes = 60, 2 minutes = 60×2=120, 5 minutes = 60×5=300 -SECONDS = int(os.getenv("SECONDS", "600")) +SECONDS = int(os.getenv("SECONDS", "900")) @@ -85,20 +85,14 @@ async def start_command(client: Client, message: Message): reply_markup = None try: - f = await msg.copy(chat_id=message.from_user.id, caption = caption, parse_mode = ParseMode.HTML, reply_markup = reply_markup, protect_content=PROTECT_CONTENT) - + f=await msg.copy(chat_id=message.from_user.id, caption = caption, parse_mode = ParseMode.HTML, reply_markup = reply_markup, protect_content=PROTECT_CONTENT) + await asyncio.sleep(0.5) except FloodWait as e: await asyncio.sleep(e.x) - f = await msg.copy(chat_id=message.from_user.id, caption = caption, parse_mode = ParseMode.HTML, reply_markup = reply_markup, protect_content=PROTECT_CONTENT) - + f=await msg.copy(chat_id=message.from_user.id, caption = caption, parse_mode = ParseMode.HTML, reply_markup = reply_markup, protect_content=PROTECT_CONTENT) except: pass - k = await client.send_message(chat_id = message.from_user.id, text=f"❗️ IMPORTANT ❗️\n\nThis video / file will be deleted in 10 minutes (Due to copyright issues).\n\n📌 Please forward this video / file to somewhere else and start downloading there.") - await asyncio.sleep(SECONDS) - await f.delete() - await k.edit_text("Your video / file is successfully deleted !") - - + return else: reply_markup = InlineKeyboardMarkup( @@ -128,7 +122,7 @@ async def start_command(client: Client, message: Message): WAIT_MSG = """"Processing ...""" -REPLY_ERROR = """Use this command as a replay to any telegram message with out any spaces.""" +REPLY_ERROR = """Use this command as a reply to any telegram message with out any spaces.""" #=====================================================================================## @@ -138,15 +132,15 @@ async def start_command(client: Client, message: Message): async def not_joined(client: Client, message: Message): buttons = [ [ - InlineKeyboardButton(text="Join Channel", url=client.invitelink), - InlineKeyboardButton(text="Join Channel", url=client.invitelink2), + InlineKeyboardButton(text="• ᴊᴏɪɴ ᴄʜᴀɴɴᴇʟ •", url=client.invitelink), + InlineKeyboardButton(text="• ᴊᴏɪɴ ᴄʜᴀɴɴᴇʟ •", url=client.invitelink2), ] ] try: buttons.append( [ InlineKeyboardButton( - text = 'Try Again', + text = '• ᴛʀʏ ᴀɢᴀɪɴ •', url = f"https://t.me/{client.username}?start={message.command[1]}" ) ] @@ -188,7 +182,7 @@ async def send_text(client: Bot, message: Message): deleted = 0 unsuccessful = 0 - pls_wait = await message.reply("Broadcasting Message.. This will Take Some Time") + pls_wait = await message.reply("Broadcasting Message... This Will Take Some Time") for chat_id in query: try: await broadcast_msg.copy(chat_id)