Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blockMessage = "MESSAGGIO DI BLOCCO QUI"
- from telethon.tl.functions.contacts import BlockRequest
- @register(outgoing=True, pattern="^[.]block$")
- async def blockUser(e):
- if not (await e.get_sender()).bot:
- global blockMessage
- if e.is_reply:
- reply = await e.get_reply_message()
- await e.delete()
- await e.client.send_message(reply.chat_id, blockMessage, reply_to=reply)
- await e.client(BlockRequest(reply.sender.id))
- else:
- if e.is_private:
- await e.edit(blockMessage)
- await e.client(BlockRequest(e.chat_id))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement