|
@@ -25,65 +25,77 @@ SOFTWARE.
|
|
|
from pyrogram import filters
|
|
from pyrogram import filters
|
|
|
from pyrogram.types import Message
|
|
from pyrogram.types import Message
|
|
|
|
|
|
|
|
-from wbb import USERBOT_ID, USERBOT_PREFIX, app2, eor
|
|
|
|
|
|
|
+from wbb import USERBOT_ID, USERBOT_PREFIX, app2, eor, telegraph
|
|
|
|
|
|
|
|
-# Yeah i know this should've been in userbot.py,
|
|
|
|
|
-# But i wrote it here for some obvious reasons.
|
|
|
|
|
__MODULE__ = "Userbot"
|
|
__MODULE__ = "Userbot"
|
|
|
-__HELP__ = """
|
|
|
|
|
-`.alive`
|
|
|
|
|
- Send Alive Message.
|
|
|
|
|
-
|
|
|
|
|
-`.create (b|s|c) Title`
|
|
|
|
|
- create [basic|super]group & channel
|
|
|
|
|
-
|
|
|
|
|
-`.chatbot [ENABLE|DISABLE]`
|
|
|
|
|
- Enable chatbot in a chat.
|
|
|
|
|
-
|
|
|
|
|
-`.autocorrect [ENABLE|DISABLE]`
|
|
|
|
|
- This will autocorrect your messages on the go.
|
|
|
|
|
-
|
|
|
|
|
-`.purgeme [Number of messages to purge]`
|
|
|
|
|
- Purge your own messages.
|
|
|
|
|
- Ex: .purgeme 10
|
|
|
|
|
-
|
|
|
|
|
-`.eval [Lines of code]`
|
|
|
|
|
- Execute Python Code.
|
|
|
|
|
-`.lsTasks`
|
|
|
|
|
- List running tasks (eval)
|
|
|
|
|
-`.sh [Some shell code]`
|
|
|
|
|
- Execute Shell Code.
|
|
|
|
|
-
|
|
|
|
|
-`.approve`
|
|
|
|
|
- Approve a user to PM you.
|
|
|
|
|
-`.disapprove`
|
|
|
|
|
- Disapprove a user to PM you.
|
|
|
|
|
-`.block`
|
|
|
|
|
- Block a user.
|
|
|
|
|
-`.unblock`
|
|
|
|
|
- Unblock a user.
|
|
|
|
|
-
|
|
|
|
|
-`.anonymize`
|
|
|
|
|
- Change Name/PFP Randomly.
|
|
|
|
|
-`.impersonate [User_ID|Username|Reply]`
|
|
|
|
|
- Clone profile of a user.
|
|
|
|
|
-
|
|
|
|
|
-`.useradd`
|
|
|
|
|
- To add a user in sudoers.
|
|
|
|
|
- [Don't use it if you don't know what you're doing]
|
|
|
|
|
-`.userdel`
|
|
|
|
|
- To remove a user from sudoers.
|
|
|
|
|
-`.sudoers`
|
|
|
|
|
- To list sudo users.
|
|
|
|
|
-
|
|
|
|
|
-`.download [URL or reply to a file]`
|
|
|
|
|
- Download a file from TG or URL
|
|
|
|
|
-`.upload [URL or File Path]`
|
|
|
|
|
- Upload a file from local or URL
|
|
|
|
|
-
|
|
|
|
|
-`.parse_preview [REPLY TO A MESSAGE]`
|
|
|
|
|
- Parse a web_page(link) preview
|
|
|
|
|
|
|
+TEXT = """
|
|
|
|
|
+<code>alive</code> → Send Alive Message.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>create (b|s|c) Title</code> → create [basic|super]group & channel<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>chatbot [ENABLE|DISABLE]</code> → Enable chatbot in a chat.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>autocorrect [ENABLE|DISABLE]</code> → This will autocorrect your messages on the go.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>purgeme [Number of messages to purge]</code> → Purge your own messages.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>eval [Lines of code]</code> → Execute Python Code.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>lsTasks</code> → List running tasks (eval)<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>sh [Some shell code]</code> → Execute Shell Code.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>approve</code> → Approve a user to PM you.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>disapprove</code> → Disapprove a user to PM you.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>block</code> → Block a user.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>unblock</code> → Unblock a user.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>anonymize</code> → Change Name/PFP Randomly.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>impersonate [User_ID|Username|Reply]</code> → Clone profile of a user.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>useradd</code> → To add a user in sudoers. [UNSAFE]<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>userdel</code> → To remove a user from sudoers.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>sudoers</code> → To list sudo users.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>download [URL or reply to a file]</code> → Download a file from TG or URL<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>upload [URL or File Path]</code> → Upload a file from local or URL<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>parse_preview [REPLY TO A MESSAGE]</code> → Parse a web_page(link) preview<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>id</code> → Same as /id but for Ubot<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>paste</code> → Paste shit on batbin.<br>
|
|
|
|
|
+
|
|
|
|
|
+<code>help</code> → Get link to this page.
|
|
|
|
|
+
|
|
|
|
|
+<code>kang</code> → Kang stickers.
|
|
|
"""
|
|
"""
|
|
|
|
|
+print("[INFO]: Pasting userbot commands on telegraph")
|
|
|
|
|
+
|
|
|
|
|
+__HELP__ = f"""**Commands:** {telegraph.create_page(
|
|
|
|
|
+ "Userbot Commands",
|
|
|
|
|
+ html_content=TEXT,
|
|
|
|
|
+ )['url']}"""
|
|
|
|
|
+
|
|
|
|
|
+print("[INFO]: Done pasting userbot commands on telegraph")
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+@app2.on_message(
|
|
|
|
|
+ filters.command("help", prefixes=USERBOT_PREFIX) & filters.user(USERBOT_ID)
|
|
|
|
|
+)
|
|
|
|
|
+async def get_help(_, message: Message):
|
|
|
|
|
+ await eor(
|
|
|
|
|
+ message,
|
|
|
|
|
+ text=__HELP__,
|
|
|
|
|
+ disable_web_page_preview=True,
|
|
|
|
|
+ )
|
|
|
|
|
|
|
|
|
|
|
|
|
@app2.on_message(
|
|
@app2.on_message(
|