forked from TeamUltroid/UltroidAddons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoprofile.py
82 lines (69 loc) · 2 KB
/
autoprofile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# Ultroid - UserBot
#
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
# Ported Plugin
"""
✘ Commands Available -
• `{i}autoname`
`Starts AUTONAME`.
• `{i}stopname`
`Stops AUTONAME.`
• `{i}autobio`
`Starts AUTOBIO.`
• `{i}stopbio`
`Stops AUTOBIO.`
"""
import random
from telethon.tl.functions.account import UpdateProfileRequest
from . import *
@ultroid_cmd(pattern="(auto|stop)name$")
async def autoname_(event):
match = event.pattern_match.group(1)
if match == "stop":
udB.delete("AUTONAME")
await event.eor("`AUTONAME has been Stopped !`")
return
udB.set("AUTONAME", "True")
await eod(event, "`Started AUTONAME`")
while True:
getn = udB.get("AUTONAME")
if not getn:
return
DM = time.strftime("%d-%m-%y")
HM = time.strftime("%H:%M")
name = f"🕒{HM} ⚡{OWNER_NAME}⚡ {DM} 🗓️"
await event.client(UpdateProfileRequest(first_name=name))
await asyncio.sleep(1111)
@ultroid_cmd(pattern="(auto|stop)bio$")
async def autoname_(event):
match = event.pattern_match.group(1)
if match == "stop":
udB.delete("AUTOBIO")
await event.eor("`AUTOBIO has been Stopped !`")
return
udB.set("AUTOBIO", "True")
await eod(event, "`Started AUTOBIO`")
BIOS = [
"Busy Today !",
"ULTROID USER",
"Enjoying Life!",
"Unique as Always!" "Sprinkling a bit of magic",
"Intelligent !",
]
while True:
getn = udB.get("AUTOBIO")
if not getn:
return
BIOMSG = random.choice(BIOS)
DM = time.strftime("%d-%m-%y")
HM = time.strftime("%H:%M")
name = f"📅{DM} | {BIOMSG} | ⌚️{HM}"
await event.client(
UpdateProfileRequest(
about=name,
)
)
await asyncio.sleep(1111)