Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "<b>ʜᴇʟʟᴏ {first}\n\nɪ ᴀᴍ ᴀ ꜰɪʟᴇ ꜱᴛᴏʀᴇʀ ʙᴏᴛ ᴏꜰ ɪᴀꜱ ᴍᴏᴠɪᴇꜱ & ꜱᴇʀɪᴇꜱ, ɪ ꜱᴛᴏʀᴇ ꜰɪʟᴇꜱ ɪɴꜱɪᴅᴇ ᴍᴇ ᴀɴᴅ ʏᴏᴜ ᴄᴀɴ ɢᴇᴛ ᴛʜᴇᴍ ʙʏ ꜱᴏʟᴠɪɴɢ ꜱʜᴏʀᴛᴇɴᴇʀ ꜰʀᴏᴍ ᴏᴜʀ ᴄʜᴀɴɴᴇʟ!\n» @IAS_MOVIESANDSERIES</b>",
"required": false
},
"FORCE_SUB_MESSAGE": {
"description": "Optional: Force Sub message of bot, use HTML parsemode format",
"value": "Hello {mention}\n\n<b>You Need To Join In My Channel To Use Me\n\nKindly Please Join Channel</b>",
"value": "𝐒𝐨𝐫𝐫𝐲 {first} 𝐲𝐨𝐮 𝐡𝐚𝐯𝐞 𝐭𝐨 𝐣𝐨𝐢𝐧 𝐦𝐲 𝐜𝐡𝐚𝐧𝐧𝐞𝐥𝐬 𝐟𝐢𝐫𝐬𝐭 𝐭𝐨 𝐚𝐜𝐜𝐞𝐬𝐬 𝐟𝐢𝐥𝐞𝐬...\n\n 𝐒𝐨 𝐩𝐥𝐞𝐚𝐬𝐞 𝐣𝐨𝐢𝐧 𝐦𝐲 𝐜𝐡𝐚𝐧𝐧𝐞𝐥𝐬 𝐟𝐢𝐫𝐬𝐭 𝐚𝐧𝐝 𝐜𝐥𝐢𝐜𝐤 𝐨𝐧 “𝐍𝐨𝐰 𝐂𝐥𝐢𝐜𝐤 𝐡𝐞𝐫𝐞” 𝐛𝐮𝐭𝐭𝐨𝐧...!",
"required": false
},
"ADMINS": {
Expand All @@ -78,7 +78,7 @@
},
"SECONDS": {
"description": "auto delete in seconds",
"value": "600",
"value": "900",
"required": false
}
},
Expand Down
28 changes: 14 additions & 14 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand All @@ -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", "<b>ʜᴇʟʟᴏ {first}\n\nɪ ᴀᴍ ᴀ ꜰɪʟᴇ ꜱᴛᴏʀᴇʀ ʙᴏᴛ ᴏꜰ ɪᴀꜱ ᴍᴏᴠɪᴇꜱ & ꜱᴇʀɪᴇꜱ, ɪ ꜱᴛᴏʀᴇ ꜰɪʟᴇꜱ ɪɴꜱɪᴅᴇ ᴍᴇ ᴀɴᴅ ʏᴏᴜ ᴄᴀɴ ɢᴇᴛ ᴛʜᴇᴍ ʙʏ ꜱᴏʟᴠɪɴɢ ꜱʜᴏʀᴛᴇɴᴇʀ ꜰʀᴏᴍ ᴏᴜʀ ᴄʜᴀɴɴᴇʟ!\n» @IAS_MOVIESANDSERIES</b>")

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\n<b>You need to join in my Channel/Group to use me\n\nKindly Please join Channel</b>")
FORCE_MSG = os.environ.get("FORCE_SUB_MESSAGE", "𝐒𝐨𝐫𝐫𝐲 {first} 𝐲𝐨𝐮 𝐡𝐚𝐯𝐞 𝐭𝐨 𝐣𝐨𝐢𝐧 𝐦𝐲 𝐜𝐡𝐚𝐧𝐧𝐞𝐥𝐬 𝐟𝐢𝐫𝐬𝐭 𝐭𝐨 𝐚𝐜𝐜𝐞𝐬𝐬 𝐟𝐢𝐥𝐞𝐬...\n\n 𝐒𝐨 𝐩𝐥𝐞𝐚𝐬𝐞 𝐣𝐨𝐢𝐧 𝐦𝐲 𝐜𝐡𝐚𝐧𝐧𝐞𝐥𝐬 𝐟𝐢𝐫𝐬𝐭 𝐚𝐧𝐝 𝐜𝐥𝐢𝐜𝐤 𝐨𝐧 “Try Again” 𝐛𝐮𝐭𝐭𝐨𝐧...!")

CUSTOM_CAPTION = os.environ.get("CUSTOM_CAPTION", None)

Expand All @@ -59,10 +59,10 @@
DISABLE_CHANNEL_BUTTON = os.environ.get("DISABLE_CHANNEL_BUTTON", None) == 'True'

BOT_STATS_TEXT = "<b>BOT UPTIME</b>\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"

Expand Down
2 changes: 1 addition & 1 deletion helper_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import pyrogram.utils

pyrogram.utils.MIN_CHANNEL_ID = -1002241322609

from bot import Bot

Bot().run()
2 changes: 1 addition & 1 deletion plugins/cbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<b>🤖 My Name :</b> <a href='https://t.me/FileSharingXProBot'>File Sharing Bot</a> \n<b>📝 Language :</b> <a href='https://python.org'>Python 3</a> \n<b>📚 Library :</b> <a href='https://pyrogram.org'>Pyrogram {__version__}</a> \n<b>🚀 Server :</b> <a href='https://heroku.com'>Heroku</a> \n<b>📢 Channel :</b> <a href='https://t.me/Madflix_Bots'>Madflix Botz</a> \n<b>🧑‍💻 Developer :</b> <a href='tg://user?id={OWNER_ID}'>Jishu Developer</a>",
text = f"<b>○ ᴏᴡɴᴇʀ : <a href='tg://user?id={1308086294}'>ᴍɪɴᴀᴛᴏ-ꜱᴀᴍᴀ</a>\n○ ᴄʜᴀɴɴᴇʟ : <a href='https://t.me/+WHsaD_54uApiMDJl'>ɪᴀꜱ: ᴍᴏᴠɪᴇꜱᴀɴᴅꜱᴇʀɪᴇꜱ</a>\n○ ʙᴀᴄᴋᴜᴘ : <a href='https://t.me/+6LZSdAbBv4c0MDVl'>ɪᴀꜱ ᴍ&ꜱ ʙᴀᴄᴋᴜᴘ</a>\n○ ɢʀᴏᴜᴘ : <a href='https://t.me/+0qJVE9L4pPhhNWM1'>ɪᴀꜱ ᴄʜᴀᴛ ɢʀᴏᴜᴘ</a></b>",
disable_web_page_preview = True,
reply_markup = InlineKeyboardMarkup(
[
Expand Down
6 changes: 3 additions & 3 deletions plugins/channel_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}')]])

Expand All @@ -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)
Expand All @@ -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
# Developer @JishuDeveloper
6 changes: 3 additions & 3 deletions plugins/link_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"<b>Here is your link</b>\n\n{link}", quote=True, reply_markup=reply_markup)

Expand All @@ -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"<b>Here is your link</b>\n\n{link}", quote=True, reply_markup=reply_markup)

Expand All @@ -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
# Developer @JishuDeveloper
26 changes: 10 additions & 16 deletions plugins/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))



Expand Down Expand Up @@ -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"<b>❗️ <u>IMPORTANT</u> ❗️</b>\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(
Expand Down Expand Up @@ -128,7 +122,7 @@ async def start_command(client: Client, message: Message):

WAIT_MSG = """"<b>Processing ...</b>"""

REPLY_ERROR = """<code>Use this command as a replay to any telegram message with out any spaces.</code>"""
REPLY_ERROR = """<code>Use this command as a reply to any telegram message with out any spaces.</code>"""

#=====================================================================================##

Expand All @@ -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]}"
)
]
Expand Down Expand Up @@ -188,7 +182,7 @@ async def send_text(client: Bot, message: Message):
deleted = 0
unsuccessful = 0

pls_wait = await message.reply("<i>Broadcasting Message.. This will Take Some Time</i>")
pls_wait = await message.reply("<i>Broadcasting Message... This Will Take Some Time</i>")
for chat_id in query:
try:
await broadcast_msg.copy(chat_id)
Expand Down