Skip to content

Commit

Permalink
Update start.py
Browse files Browse the repository at this point in the history
Signed-off-by: ˹sᴜᴍɪᴛ ✗ ˼ <[email protected]>
  • Loading branch information
SUMIT0481 authored Sep 13, 2023
1 parent 23fe19b commit ec7273e
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions AnonXMusic/plugins/bot/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ async def start_pm(client, message: Message, _):
name = message.text.split(None, 1)[1]
if name[0:4] == "help":
keyboard = help_pannel(_)
return await message.reply_photo(
photo=config.START_IMG_URL,
return await message.reply_animation(
animation=config.START_IMG_URL,
caption=_["help_1"].format(config.SUPPORT_CHAT),
reply_markup=keyboard,
)
Expand All @@ -43,6 +43,15 @@ async def start_pm(client, message: Message, _):
return await app.send_message(
chat_id=config.LOGGER_ID,
text=f"{message.from_user.mention} ᴊᴜsᴛ sᴛᴀʀᴛᴇᴅ ᴛʜᴇ ʙᴏᴛ ᴛᴏ ᴄʜᴇᴄᴋ <b>sᴜᴅᴏʟɪsᴛ</b>.\n\n<b>ᴜsᴇʀ ɪᴅ :</b> <code>{message.from_user.id}</code>\n<b>ᴜsᴇʀɴᴀᴍᴇ :</b> @{message.from_user.username}",
)
if name == "verify":
await message.reply_text(f"ʜᴇʏ {message.from_user.first_name},\nᴛʜᴀɴᴋs ғᴏʀ ᴠᴇʀɪғʏɪɴɢ ʏᴏᴜʀsᴇʟғ ɪɴ {app.mention}, ɴᴏᴡ ʏᴏᴜ ᴄᴀɴ ɢᴏ ʙᴀᴄᴋ ᴀɴᴅ sᴛᴀʀᴛ ᴜsɪɴɢ ᴍᴇ.")
if await is_on_off(2):
sender_id = message.from_user.id
sender_name = message.from_user.first_name
return await app.send_message(
config.LOGGER_ID,
f"{message.from_user.mention} ᴊᴜsᴛ sᴛᴀʀᴛᴇᴅ ᴛʜᴇ ʙᴏᴛ ᴛᴏ <code>ᴠᴇʀɪғʏ ʜɪᴍsᴇʟғ</code>\n\n**ᴜsᴇʀ ɪᴅ:** {sender_id}\n**ᴜsᴇʀɴᴀᴍᴇ:** {sender_name}",
)
return
if name[0:3] == "inf":
Expand Down Expand Up @@ -71,9 +80,9 @@ async def start_pm(client, message: Message, _):
]
)
await m.delete()
await app.send_photo(
await app.send_animation(
chat_id=message.chat.id,
photo=thumbnail,
animation=thumbnail,
caption=searched_text,
reply_markup=key,
)
Expand All @@ -84,8 +93,8 @@ async def start_pm(client, message: Message, _):
)
else:
out = private_panel(_)
await message.reply_photo(
photo=config.START_IMG_URL,
await message.reply_animation(
animation=config.START_IMG_URL,
caption=_["start_2"].format(message.from_user.mention, app.mention),
reply_markup=InlineKeyboardMarkup(out),
)
Expand All @@ -101,8 +110,8 @@ async def start_pm(client, message: Message, _):
async def start_gp(client, message: Message, _):
out = start_panel(_)
uptime = int(time.time() - _boot_)
await message.reply_photo(
photo=config.START_IMG_URL,
await message.reply_animation(
animation=config.START_IMG_URL,
caption=_["start_1"].format(app.mention, get_readable_time(uptime)),
reply_markup=InlineKeyboardMarkup(out),
)
Expand Down Expand Up @@ -136,8 +145,8 @@ async def welcome(client, message: Message):
return await app.leave_chat(message.chat.id)

out = start_panel(_)
await message.reply_photo(
photo=config.START_IMG_URL,
await message.reply_animation(
animation=config.START_IMG_URL,
caption=_["start_3"].format(
message.from_user.first_name,
app.mention,
Expand Down

0 comments on commit ec7273e

Please sign in to comment.