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

Update private.py #3

Open
wants to merge 2 commits into
base: main
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
44 changes: 22 additions & 22 deletions handlers/play.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def generate_cover(requested_by, title, views, duration, thumbnail):
& ~filters.via_bot)
async def play(_, message: Message):

lel = await message.reply("🔄 **Processing...**")
lel = await message.reply("🕵️ **चला रहा हूं**")

administrators = await get_administrators(message.chat)
chid = message.chat.id
Expand All @@ -118,18 +118,18 @@ async def play(_, message: Message):
try:
await USER.join_chat(invitelink)
await USER.send_message(
message.chat.id, "**camila Music assistant joined this group for play music 🎵**")
message.chat.id, "**crepan assistant इस ग्रुप में गाने चलाने के लिए आ गया है 🙂**")

except UserAlreadyParticipant:
pass
except Exception:
await lel.edit(
f"<b>🛑 Flood Wait Error 🛑</b> \n\Hey {user.first_name},@camilaassistant userbot couldn't join your group due to heavy join requests @warbotzsupport. Make sure userbot is not banned in group and try again later!")
f"<b>🛑 Flood Wait Error 🛑</b> \n\Hey {user.first_name},@CrepanAssistant userbot couldn't join your group due to heavy join requests @CrepanSupport. Make sure userbot is not banned in group and try again later!")
try:
await USER.get_chat(chid)
except:
await lel.edit(
f"<i>Hey {user.first_name}, @camilaassistant userbot is not in this chat, ask admin to send /play command for first time to add it.</i>")
f"<i>Hey {user.first_name}, @CrepanAssistant userbot is not in this chat, ask admin to send /play command for first time to add it.</i>")
return

audio = (message.reply_to_message.audio or message.reply_to_message.voice) if message.reply_to_message else None
Expand All @@ -152,8 +152,8 @@ async def play(_, message: Message):
[
[
InlineKeyboardButton(
text="Channel 🔊",
url="https://t.me/warbotz")
text="Support",
url="https://t.me/crepansupport")

]
]
Expand Down Expand Up @@ -190,11 +190,11 @@ async def play(_, message: Message):
[
[
InlineKeyboardButton(
text="YouTube 🎬",
url=f"{url}"),
text="𝗦𝗨𝗣𝗣𝗢𝗥𝗧",
url=f"https://t.me/crepansupport"),
InlineKeyboardButton(
text="Download 📥",
url=f"{durl}")
text="𝗢𝗪𝗡𝗘𝗥",
url=f"https://t.me/crepan")

]
]
Expand All @@ -208,8 +208,8 @@ async def play(_, message: Message):
[
[
InlineKeyboardButton(
text="YouTube 🎬",
url=f"https://youtube.com")
text="𝗦𝗨𝗣𝗣𝗢𝗥𝗧",
url=f"https://t.me/crepansupport")

]
]
Expand All @@ -222,11 +222,11 @@ async def play(_, message: Message):
file_path = await converter.convert(youtube.download(url))
else:
if len(message.command) < 2:
return await lel.edit("🧐 **What's the song you want to play?**")
await lel.edit("🔎 **Finding the song...**")
return await lel.edit("😡 **क्या चलाना है, नाम तो डाल**")
await lel.edit("🔎 **देख रहा हूं...**")
query = message.text.split(None, 1)[1]
# print(query)
await lel.edit("🎵 **Processing sounds...**")
await lel.edit("🎵 **चला रहा हूं...**")
try:
results = YoutubeSearch(query, max_results=1).to_dict()
url = f"https://youtube.com{results[0]['url_suffix']}"
Expand All @@ -249,7 +249,7 @@ async def play(_, message: Message):

except Exception as e:
await lel.edit(
"❌ Song not found.\n\nTry another song or maybe spell it properly."
"❌ Sorry नहीं मिला.\n\nTry another song or maybe spell it properly."
)
print(str(e))
return
Expand All @@ -258,11 +258,11 @@ async def play(_, message: Message):
[
[
InlineKeyboardButton(
text="YouTube 🎬",
url=f"{url}"),
text="𝗦𝗨𝗣𝗣𝗢𝗥𝗧",
url=f"https://t.me/crepansupport"),
InlineKeyboardButton(
text="Download 📥",
url=f"{durl}")
text="𝗢𝗪𝗡𝗘𝗥",
url=f"https://t.me/crepansupport")

]
]
Expand All @@ -279,7 +279,7 @@ async def play(_, message: Message):
position = await queues.put(message.chat.id, file=file_path)
await message.reply_photo(
photo="final.png",
caption="**🎵 Song:** {}\n**🕒 Duration:** {} min\n**👤 Added By:** {}\n\n**#⃣ Queued Position:** {}".format(
caption="**🎵 Song:** {}\n**🕒 Duration:** {} min\n**👤 Added By:**𝗖𝗿𝗲𝗽𝗮𝗻\n\n**#⃣ Queued Position:** {}".format(
title, duration, message.from_user.mention(), position
),
reply_markup=keyboard)
Expand All @@ -290,7 +290,7 @@ async def play(_, message: Message):
await message.reply_photo(
photo="final.png",
reply_markup=keyboard,
caption="**🎵 Song:** {}\n**🕒 Duration:** {} min\n**👤 Added By:** {}\n\n**▶️ Now Playing at `{}`...**".format(
caption="**🎵 Song:** {}\n**🕒 Duration:** {} min\n**👤 Added By:** 𝗖𝗿𝗲𝗽𝗮𝗻\n\n**▶️ Now Playing at `{}`...**".format(
title, duration, message.from_user.mention(), message.chat.title
), )
os.remove("final.png")
Expand Down
19 changes: 10 additions & 9 deletions handlers/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,27 @@
async def start(_, message: Message):
await message.reply_sticker("CAACAgUAAxkBAAItmWD3OC0m03OLIcpSzfiJMCDxm4xJAAKFAwACH8C5V-U9VextES_XIAQ")
await message.reply_text(
f"""**Hey, I'm {bn} 🎀
ɪ ᴄᴀɴ ᴘʟᴀʏ ᴍᴜsɪᴄ ɪɴ ʏᴏᴜʀ ɢʀᴏᴜᴩ ᴠᴏɪᴄᴇ ᴄʜᴀᴛ.
ᴀᴅᴅ ᴍᴇ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴩ ᴀɴᴅ ᴘʟᴀʏ ᴍᴜsɪᴄ ғʀᴇᴇʟʏ Developed By [ᴡᴀʀʙᴏᴛᴢ](https://t.me/thewarbotZ) !**
f"""**Hey, में 𝗖𝗿𝗲𝗽𝗮𝗻 हूं 👨‍💻
में आपके ɢʀᴏᴜᴩ में ᴍᴜsɪᴄ चला सकता हूं ।
मुझे आपके ɢʀᴏᴜᴩ में ᴀᴅᴅ करके ॲडमीन बनाये और साथ ही साथ @CrepanAssistant को आपके ɢʀᴏᴜᴩ में ᴀᴅᴅ करें और अपने मनपसंद गाने चलाकर मज़े ले 😊
Pᴏᴡᴇʀᴇᴅ ʙʏ : [𝗖𝗥𝗘𝗔𝗧𝗢𝗥 𝗣𝗔𝗩𝗔𝗡](https://t.me/crepan) !**

""",
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"🔨Source Code🔨", url="https://github.com/xabhish3k/camillavcbot2.0")
"👨‍💻 𝗢𝗪𝗡𝗘𝗥 👨‍💻", url="https://t.me/crepan")
],[
InlineKeyboardButton(
"sᴜᴘᴘᴏʀᴛ👿", url="https://t.me/warbotzsupport"
"sᴜᴘᴘᴏʀᴛ", url="https://t.me/crepansupport"
),
InlineKeyboardButton(
"ᴄʜᴀɴɴᴇʟ", url="https://t.me/thewarbotz"
"ᴄʜᴀɴɴᴇʟ", url="https://t.me/crepansupport"
)
],[
InlineKeyboardButton(
"➕ᴀᴅᴅ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴘ➕", url="https://t.me/camillamusicbot?startgroup=true"
"➕ɢʀᴏᴜᴩ में ᴀᴅᴅ करें➕", url="https://t.me/crepanMusicbot?startgroup=true"
)]
]
),
Expand All @@ -37,12 +38,12 @@ async def start(_, message: Message):

@Client.on_message(filters.command("start") & ~filters.private & ~filters.channel)
async def gstart(_, message: Message):
await message.reply_text("""**Yes iᴍ online ✅**""",
await message.reply_text("""**online ही हूं 😄**""",
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"🔊Uᴩᴅᴀᴛᴇs", url="https://t.me/thewarbotz")
"👨‍💻 𝗢𝗪𝗡𝗘𝗥 👨‍💻", url="https://t.me/crepan")
]
]
)
Expand Down