Skip to content

Commit

Permalink
Added Exclusive Features 😎
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnoAyanOfficial committed Jun 12, 2020
1 parent 6616a58 commit c941765
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions userbot/plugins/autoname.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@



"""Auto Profile Updation Commands
.autoname"""
from telethon import events
Expand All @@ -6,21 +9,20 @@
from telethon.tl import functions
from telethon.errors import FloodWaitError
from uniborg.util import admin_cmd
from userbot import AUTONAME
from userbot.exclusive import AUTONAME, ALIVE_NAME

A_N = str(AUTONAME) if AUTONAME else f"{ALIVE_NAME}"

DEL_TIME_OUT = 60
DEFAULTUSER = str(AUTONAME) if AUTONAME else "β—’β—€α΄›α΄‡α΄„ΚœΙ΄α΄α΄€Κα΄€Ι΄β—’β—€"


@borg.on(admin_cmd(pattern="autoname")) # pylint:disable=E0602
@borg.on(admin_cmd(pattern="anun")) # pylint:disable=E0602
async def _(event):
if event.fwd_from:
return
while True:
DM = time.strftime("%d-%m-%y")
HM = time.strftime("%H:%M")
name = f"{HM} {DM} {DEFAULTUSER}"
name = f"⌚{HM} ⚑{A_N}⚑ πŸ“†{DM}"
logger.info(name)
try:
await borg(functions.account.UpdateProfileRequest( # pylint:disable=E0602
Expand All @@ -37,4 +39,4 @@ async def _(event):
# "Successfully Changed Profile Name"
# )
await asyncio.sleep(DEL_TIME_OUT)
await event.edit(f"Auto Name has been started Master")
await event.edit(f"__Auto Name Started ! Check Your Name__")

0 comments on commit c941765

Please sign in to comment.