Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ON & OFF
- ON = "π΄πππππππ§π [πππΏπΌππΈ]" #NOME ON
- OFF = "π΄πππππππ§π [ππΉπΉπΏπΌππΈ]" #NOME OFF
- autoReplyPvt = None
- async def getAutoReply():
- global autoReplyPvt
- global OFF
- if (await bot.get_me()).first_name == OFF:
- autoReplyPvt = True
- else:
- autoReplyPvt = False
- loop = asyncio.get_event_loop()
- loop.run_until_complete(getAutoReply())
- @register(outgoing=True, pattern="^[.]on$")
- async def changeNameON(e):
- global ON
- global autoReplyPvt
- await bot(UpdateProfileRequest(first_name=ON, last_name=""))
- autoReplyPvt = False
- await e.edit("β Nome Cambiato Correttamente! β [ORA SEI ONLINE]")
- @register(outgoing=True, pattern="^[.]off$")
- async def changeNameOFF(e):
- global OFF
- global autoReplyPvt
- global autoReplyLOGGER_GROUP
- global OFF
- await bot(UpdateProfileRequest(first_name=OFF, last_name=""))
- autoReplyPvt = True
- await e.edit("β Nome Cambiato Correttamente! β [ORA SEI OFFLINE]")
- @register(incoming=True)
- async def autoReply(e):
- if e.is_private and not (await e.get_sender()).bot:
- global mutedList
- if e.chat_id in mutedList:
- await e.delete()
- else:
- global autoReplyPvt
- if autoReplyPvt:
- if type((await e.client.get_me()).status).__name__ == "UserStatusOffline":
- await e.respond(message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement