commit
edcd46b055
@ -197,8 +197,11 @@ async def play(c: Client, m: Message):
|
||||
ubot = me_user.id
|
||||
b = await c.get_chat_member(chat_id, ubot)
|
||||
if b.status == "banned":
|
||||
try:
|
||||
await m.reply_text("❌ The userbot is banned in this chat, unban the userbot first to be able to play music !")
|
||||
return
|
||||
await remove_active_chat(chat_id)
|
||||
except BaseException:
|
||||
pass
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
@ -209,8 +212,6 @@ async def play(c: Client, m: Message):
|
||||
)
|
||||
await user.join_chat(invitelink)
|
||||
await remove_active_chat(chat_id)
|
||||
except UserAlreadyParticipant:
|
||||
pass
|
||||
except UserNotParticipant:
|
||||
try:
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
|
@ -218,8 +218,11 @@ async def vplay(c: Client, m: Message):
|
||||
ubot = me_user.id
|
||||
b = await c.get_chat_member(chat_id, ubot)
|
||||
if b.status == "banned":
|
||||
try:
|
||||
await m.reply_text("❌ The userbot is banned in this chat, unban the userbot first to be able to play music !")
|
||||
return
|
||||
await remove_active_chat(chat_id)
|
||||
except BaseException:
|
||||
pass
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
@ -230,8 +233,6 @@ async def vplay(c: Client, m: Message):
|
||||
)
|
||||
await user.join_chat(invitelink)
|
||||
await remove_active_chat(chat_id)
|
||||
except UserAlreadyParticipant:
|
||||
pass
|
||||
except UserNotParticipant:
|
||||
try:
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
|
Loading…
Reference in New Issue
Block a user