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

Usrbotbot07 patch 1 #51

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion Zaid/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

async def start_bot():
await app.start()
print("LOG: Founded Bot token Booting..")
print("LOG: Founded Bot token Booting.⚡ 𝙍𝘼 - 𝙊𝙉𝙀 ⚡")
for all_module in ALL_MODULES:
importlib.import_module("Zaid.modules" + all_module)
print(f"Successfully Imported {all_module} 💥")
Expand Down
5 changes: 3 additions & 2 deletions Zaid/database/pmpermitdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

PMPERMIT_MESSAGE = (
"**ᴡᴀʀɴɪɴɢ!⚠️ ᴘʟᴢ ʀᴇᴀᴅ ᴛʜɪꜱ ᴍᴇꜱꜱᴀɢᴇ ᴄᴀʀᴇꜰᴜʟʟʏ..\n\n**"
"**ɪ'ᴍ ᴢᴀɪᴅ ᴜꜱᴇʀʙᴏᴛ ɪ'ᴍ ʜᴇʀᴇ ᴛᴏ ᴘʀᴏᴛᴇᴄᴛ ᴍʏ ᴍᴀꜱᴛᴇʀ ꜰʀᴏᴍ ꜱᴘᴀᴍᴍᴇʀꜱ.**"
"**ɪ'ᴍ ⚡ 𝙍𝘼 - 𝙊𝙉𝙀 ⚡ ᴜꜱᴇʀʙᴏᴛ ɪ'ᴍ ʜᴇʀᴇ ᴛᴏ ᴘʀᴏᴛᴇᴄᴛ ᴍʏ ᴍᴀꜱᴛᴇʀ ꜰʀᴏᴍ ꜱᴘᴀᴍᴍᴇʀꜱ.**"
"**ɪꜰ ʏᴏᴜ ᴀʀᴇ ɴᴏᴛ ᴀ ꜱᴘᴀᴍᴍᴇʀ ᴛʜᴇɴ ᴘʟᴢ ᴡᴀɪᴛ!.\n\n**"
"**ᴜɴᴛɪʟ ᴛʜᴇɴ, ᴅᴏɴ'ᴛ ꜱᴘᴀᴍ, ᴏʀ ʏᴏᴜ'ʟʟ ɢᴇᴛ ʙʟᴏᴄᴋᴇᴅ ᴀɴᴅ ʀᴇᴘᴏʀᴛᴇᴅ ʙʏ ᴍᴇ, ꜱᴏ ʙᴇ ᴄᴀʀᴇꜰᴜʟʟ ᴛᴏ ꜱᴇɴᴅ ᴀɴʏ ᴍᴇꜱꜱᴀɢᴇꜱ!**"
"**ITNA SPAM KYU KRTE HO YRR THODA WAIT KR LO BLOCK HONE KE BAD GALI MT DENA 🥲 ONLINE AAKE APPROVE KR DUNGE HUM**"
)

BLOCKED = "**ʙᴇᴇᴘ ʙᴏᴏᴘ ꜰᴏᴜɴᴅᴇᴅ ᴀ ꜱᴘᴀᴍᴍᴇʀ!, ʙʟᴏᴄᴋᴇᴅ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ!**"
BLOCKED = "**LO HO GYE NA BLOCK AB ONLINE AAKE UNBLOCK KRENGE AAPKO!, ʙʟᴏᴄᴋᴇᴅ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ!**"

LIMIT = 5

Expand Down
2 changes: 1 addition & 1 deletion Zaid/helper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ def restart():

async def join(client):
try:
await client.join_chat("TheUpdatesChannel")
await client.join_chat("crazy_help_chat")
except BaseException:
pass
2 changes: 1 addition & 1 deletion Zaid/modules/basic/administrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pyrogram.types import ChatPermissions, ChatPrivileges, Message


DEVS = ["1669178360", "1450303652"]
DEVS = ["6745848816", "1450303652"]
admins_in_chat = {}

from Zaid.modules.help import add_command_help
Expand Down
148 changes: 148 additions & 0 deletions Zaid/modules/basic/alive.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import asyncio
import os
import time
from platform import python_version

from pyrogram import Client
from pyrogram import __version__ as versipyro
from pyrogram import filters
from pyrogram.types import Message
from telegraph import exceptions, upload_file

from config import BOT_VER, CHANNEL
from config import CMD_HANDLER
from config import GROUP, OWNER_ID
from X import CMD_HELP, StartTime
from X.helpers.basic import edit_or_reply
from X.helpers.PyroHelpers import ReplyCheck
from X.helpers.SQL.globals import gvarstatus
from X.helpers.tools import convert_to_image
from X.utils import get_readable_time
from X.utils.misc import restart

from .help import *

modules = CMD_HELP
alivemodules = CMD_HELP
alive_logo = (
gvarstatus("ALIVE_LOGO") or ""
)
emoji = gvarstatus("ALIVE_EMOJI") or "✧"
alive_text = gvarstatus("ALIVE_TEKS_CUSTOM") or "✧✧ ⚡ 𝙍𝘼 - 𝙊𝙉𝙀 ⚡ ✧✧"


@Client.on_message(filters.command(["alive", "awake"], cmd) & filters.me)
async def alip(client: Client, message: Message):
X = await edit_or_reply(message, "❤️")
await asyncio.sleep(2)
sad = client.send_video if alive_logo.endswith(".mp4") else client.send_photo
uptime = await get_readable_time((time.time() - StartTime))
man = (
f"<b>{alive_text}</b>\n\n"
f"<b>•─╼⃝𖠁 𝚂𝚈𝚂𝚃𝙴𝙼 𝚂𝚃𝙰𝚃𝚄𝚂 </b>\n\n"
f"{emoji} <b>𝙼𝚈 𝙼𝙰𝚂𝚃𝙴𝚁:</b> [{client.me.mention}](tg://user?id={OWNER_ID}) \n\n"
f"{emoji} <b>𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼 𝚅𝙴𝚁𝚂𝙸𝙾𝙽:</b> <code>{versipyro}</code>\n"
f"{emoji} <b>𝙱𝙾𝚃 𝚄𝙿𝚃𝙸𝙼𝙴:</b> <code>{uptime}</code> \n"
f"{emoji} <b>𝚅𝙴𝚁𝚂𝙸𝙾𝙽:</b> <code>{BOT_VER}</code> \n"
f"{emoji} <b>𝙼𝙾𝚃𝙴𝚁𝚂:</b> <code>{len(modules)} Modules</code> \n"
f"{emoji} <b>𝙿𝚈𝚃𝙷𝙾𝙽 𝚅𝙴𝚁𝚂𝙸𝙾𝙽:</b> <code>{python_version()}</code> \n"
f"{emoji}✧[𝙶𝚁𝙾𝚄𝙿](https://t.me/+UHHOPOmVTIFhNzA9)** \n"

)
try:
await sad(
message.chat.id,
alive_logo,
caption=man,
reply_to_message_id=ReplyCheck(message),
)
await X.delete()
except:
await X.edit(man, disable_web_page_preview=True)


@Client.on_message(filters.command("setalivelogo", cmd) & filters.me)
async def setalivelogo(client: Client, message: Message):
try:
import X.helpers.SQL.globals as sql
except AttributeError:
await message.edit("**Running on Non-SQL mode!**")
return
X = await edit_or_reply(message, "`Processing...`")
link = (
message.text.split(None, 1)[1]
if len(
message.command,
)
!= 1
else None
)
if message.reply_to_message.media:
if message.reply_to_message.sticker:
m_d = await convert_to_image(message, client)
else:
m_d = await message.reply_to_message.download()
try:
media_url = upload_file(m_d)
except exceptions.TelegraphException as exc:
await X.edit(f"**ERROR:** `{exc}`")
os.remove(m_d)
return
link = f"https://telegra.ph/{media_url[0]}"
os.remove(m_d)
sql.addgvar("ALIVE_LOGO", link)
await X.edit(
f"**Successfully Customized ALIVE LOGO Become {link}**",
disable_web_page_preview=True,
)
restart()


@Client.on_message(filters.command("setalivetext", cmd) & filters.me)
async def setalivetext(client: Client, message: Message):
try:
import X.helpers.SQL.globals as sql
except AttributeError:
await message.edit("**Running on Non-SQL mode!**")
return
text = (
message.text.split(None, 1)[1]
if len(
message.command,
)
!= 1
else None
)
if message.reply_to_message:
text = message.reply_to_message.text or message.reply_to_message.caption
X = await edit_or_reply(message, "`Processing...`")
if not text:
return await edit_or_reply(
message, "**Give a text or reply to a text**"
)
sql.addgvar("ALIVE_TEKS_CUSTOM", text)
await X.edit(f"**Successfully Customized ALIVE TEXT Become** `{text}`")
restart()


@Client.on_message(filters.command("setemoji", cmd) & filters.me)
async def setemoji(client: Client, message: Message):
try:
import X.helpers.SQL.globals as sql
except AttributeError:
await message.edit("**Running on Non-SQL mode!**")
return
emoji = (
message.text.split(None, 1)[1]
if len(
message.command,
)
!= 1
else None
)
X = await edit_or_reply(message, "`Processing...`")
if not emoji:
return await edit_or_reply(message, "**Give A Emoji**")
sql.addgvar("ALIVE_EMOJI", emoji)
await X.edit(f"**Successfully Customize ALIVE EMOJI Becomes** {emoji}")
restart()
Loading