some fixes
This commit is contained in:
parent
80d5fafb9d
commit
5b14b38aa6
@ -83,10 +83,10 @@ async def play(c: Client, m: Message):
|
|||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
ubot = (await user.get_me()).id
|
ubot = (await user.get_me()).id
|
||||||
b = await c.get_chat_member(m.chat.id, ubot)
|
b = await c.get_chat_member(chat_id, ubot)
|
||||||
if b.status == "kicked":
|
if b.status == "kicked":
|
||||||
await c.unban_chat_member(m.chat.id, ubot)
|
await c.unban_chat_member(chat_id, ubot)
|
||||||
invitelink = await c.export_chat_invite_link(m.chat.id)
|
invitelink = await c.export_chat_invite_link(chat_id)
|
||||||
if invitelink.startswith("https://t.me/+"):
|
if invitelink.startswith("https://t.me/+"):
|
||||||
invitelink = invitelink.replace(
|
invitelink = invitelink.replace(
|
||||||
"https://t.me/+", "https://t.me/joinchat/"
|
"https://t.me/+", "https://t.me/joinchat/"
|
||||||
@ -94,7 +94,8 @@ async def play(c: Client, m: Message):
|
|||||||
await ubot.join_chat(invitelink)
|
await ubot.join_chat(invitelink)
|
||||||
except UserNotParticipant:
|
except UserNotParticipant:
|
||||||
try:
|
try:
|
||||||
invitelink = await c.export_chat_invite_link(m.chat.id)
|
ubot = (await user.get_me()).id
|
||||||
|
invitelink = await c.export_chat_invite_link(chat_id)
|
||||||
if invitelink.startswith("https://t.me/+"):
|
if invitelink.startswith("https://t.me/+"):
|
||||||
invitelink = invitelink.replace(
|
invitelink = invitelink.replace(
|
||||||
"https://t.me/+", "https://t.me/joinchat/"
|
"https://t.me/+", "https://t.me/joinchat/"
|
||||||
|
Loading…
Reference in New Issue
Block a user