Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 1 #5

Open
wants to merge 10 commits into
base: patch-1
Choose a base branch
from
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ Press Below Button to Deploy!
<p align="left">
<a href="https://instagram.com/AbirHasan2005"><img src="https://img.shields.io/badge/Instagram-Follow%20on%20Instagram-important.svg?logo=instagram"></a>
</p>


<b>ᴅᴇᴠᴇʟᴏᴘᴇʀ ›› [ᴀᴀᴅʜɪ](https://telegram.dog/AboutAadhi) | [ɪɴsᴛᴀɢʀᴀᴍ](https://www.instagram.com/_aadil_m__/) | [ɢɪᴛʜᴜʙ](GitHub.com/Aadhi000)</b>
<b>ᴄʜᴀɴɴᴇʟ ›› [ᴍᴡ ᴜᴘᴅᴀᴛᴇᴢ](https://t.me/MWUpdatez)</b>
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"rename",
"bot"
],
"repository": "https://github.com/AbirHasan2005/Rename-Bot",
"repository": "https://github.com/Nani0778/Rename-Bot",
"website": "https://abirhasan.wtf",
"success_url": "https://t.me/AH_RenameBot",
"env": {
Expand Down
4 changes: 2 additions & 2 deletions bot/plugins/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from bot.core.handlers.broadcast import broadcast_handler


@Client.on_message(filters.command("status") & filters.user(Config.OWNER_ID) & ~filters.edited)
@Client.on_message(filters.command("status") & filters.user(Config.OWNER_ID))
async def status_handler(_, m: Message):
total, used, free = shutil.disk_usage(".")
total = humanbytes(total)
Expand All @@ -35,6 +35,6 @@ async def status_handler(_, m: Message):
)


@Client.on_message(filters.command("broadcast") & filters.user(Config.OWNER_ID) & filters.reply & ~filters.edited)
@Client.on_message(filters.command("broadcast") & filters.user(Config.OWNER_ID) & filters.reply)
async def broadcast_in(_, m: Message):
await broadcast_handler(m)
2 changes: 1 addition & 1 deletion bot/plugins/on_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)


@Client.on_message((filters.video | filters.audio | filters.document) & ~filters.channel & ~filters.edited)
@Client.on_message((filters.video | filters.audio | filters.document) & ~filters.channel)
async def on_media_handler(c: Client, m: "types.Message"):
if not m.from_user:
return await m.reply_text("I don't know about you sar :(")
Expand Down
4 changes: 2 additions & 2 deletions bot/plugins/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from bot.core.db.add import add_user_to_database


@Client.on_message(filters.command(["start", "ping"]) & filters.private & ~filters.edited)
@Client.on_message(filters.command(["start", "ping"]) & filters.private)
async def ping_handler(c: Client, m: "types.Message"):
if not m.from_user:
return await m.reply_text("I don't know about you sir :(")
Expand All @@ -23,7 +23,7 @@ async def ping_handler(c: Client, m: "types.Message"):
)


@Client.on_message(filters.command("help") & filters.private & ~filters.edited)
@Client.on_message(filters.command("help") & filters.private)
async def help_handler(c: Client, m: "types.Message"):
if not m.from_user:
return await m.reply_text("I don't know about you sar :(")
Expand Down
2 changes: 1 addition & 1 deletion bot/plugins/rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from bot.core.handlers.big_rename import handle_big_rename


@Client.on_message(filters.command(["rename", "r"]) & filters.private & ~filters.edited)
@Client.on_message(filters.command(["rename", "r"]) & filters.private)
async def rename_handler(c: Client, m: Message):
# Checks
if not m.from_user:
Expand Down
6 changes: 3 additions & 3 deletions bot/plugins/thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from bot.core.db.add import add_user_to_database


@Client.on_message(filters.command("show_thumbnail") & filters.private & ~filters.edited)
@Client.on_message(filters.command("show_thumbnail") & filters.private)
async def show_thumbnail(c: Client, m: "types.Message"):
if not m.from_user:
return await m.reply_text("I don't know about you sir :(")
Expand All @@ -22,7 +22,7 @@ async def show_thumbnail(c: Client, m: "types.Message"):
))


@Client.on_message(filters.command("set_thumbnail") & filters.private & ~filters.edited)
@Client.on_message(filters.command("set_thumbnail") & filters.private)
async def set_thumbnail(c: Client, m: "types.Message"):
if (not m.reply_to_message) or (not m.reply_to_message.photo):
return await m.reply_text("𝚁𝙴𝙿𝙻𝚈 𝚃𝙾 𝙰𝙽𝚈 𝙸𝙼𝙰𝙶𝙴 𝚃𝙾 𝚂𝙰𝚅𝙴 𝙸𝙽 𝙰𝚂 𝙲𝚄𝚂𝚃𝙾𝙼 𝚃𝙷𝚄𝙼𝙱𝙽𝙰𝙸𝙻!!")
Expand All @@ -38,7 +38,7 @@ async def set_thumbnail(c: Client, m: "types.Message"):
))


@Client.on_message(filters.command("delete_thumbnail") & filters.private & ~filters.edited)
@Client.on_message(filters.command("delete_thumbnail") & filters.private)
async def delete_thumbnail(c: Client, m: "types.Message"):
if not m.from_user:
return await m.reply_text("I don't know about you sar :(")
Expand Down
2 changes: 1 addition & 1 deletion bot/plugins/video_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def filesystem_free(path='.'):
return free


@Client.on_message(filters.command("video_info") & filters.private & ~filters.edited)
@Client.on_message(filters.command("video_info") & filters.private)
async def video_info_handler(c: Client, m: Message):
await add_user_to_database(c, m)
if filesystem_free() < 5000000000:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Pyrogram
git+https://github.com/subinps/pyrogram@inline-m
TgCrypto
pyromod
python-dotenv
Expand Down