Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from telethon.tl.functions.contacts import UnblockRequest
- unblockMessage = "**Sei stato sbloccato lollzzss**"
- @register(outgoing=True, pattern="^.unblock$")
- async def unblockUser(e):
- if not e.text[0].isalpha():
- if not (await e.get_sender()).bot:
- global unblockMessage
- if e.is_reply:
- reply = await e.get_reply_message()
- await e.delete()
- await e.client.send_message(reply.chat_id, unblockMessage, reply_to=reply)
- await e.client(UnblockRequest(reply.sender.id))
- else:
- if e.is_private:
- await e.edit(unblockMessage)
- await e.client(UnblockRequest(e.chat_id))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement