commit
dbbfb46f0c
@ -111,7 +111,10 @@ async def play(c: Client, m: Message):
|
||||
b = await c.get_chat_member(chat_id, ubot)
|
||||
if b.status == "kicked":
|
||||
await c.unban_chat_member(chat_id, ubot)
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
@ -120,7 +123,10 @@ async def play(c: Client, m: Message):
|
||||
await remove_active_chat(chat_id)
|
||||
except UserNotParticipant:
|
||||
try:
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
|
@ -23,7 +23,11 @@ async def join_chat(c: Client, m: Message):
|
||||
await m.reply_text("❗️ **You've blocked from using this bot!**")
|
||||
return
|
||||
try:
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
# If it exists, use it.
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
|
@ -126,7 +126,10 @@ async def vplay(c: Client, m: Message):
|
||||
b = await c.get_chat_member(chat_id, ubot)
|
||||
if b.status == "kicked":
|
||||
await c.unban_chat_member(chat_id, ubot)
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
@ -135,7 +138,10 @@ async def vplay(c: Client, m: Message):
|
||||
await remove_active_chat(chat_id)
|
||||
except UserNotParticipant:
|
||||
try:
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
@ -422,7 +428,10 @@ async def vstream(c: Client, m: Message):
|
||||
b = await c.get_chat_member(chat_id, ubot)
|
||||
if b.status == "kicked":
|
||||
await c.unban_chat_member(chat_id, ubot)
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
@ -431,7 +440,10 @@ async def vstream(c: Client, m: Message):
|
||||
await remove_active_chat(chat_id)
|
||||
except UserNotParticipant:
|
||||
try:
|
||||
invitelink = await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if not invitelink:
|
||||
await c.export_chat_invite_link(chat_id)
|
||||
invitelink = (await c.get_chat(chat_id)).invite_link
|
||||
if invitelink.startswith("https://t.me/+"):
|
||||
invitelink = invitelink.replace(
|
||||
"https://t.me/+", "https://t.me/joinchat/"
|
||||
|
Loading…
Reference in New Issue
Block a user