-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy.py
61 lines (37 loc) · 1.44 KB
/
deploy.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
from telethon import events
import asyncio
from uniborg.util import admin_cmd
from userbot import CMD_HELP
from userbot import AUTONAME
DEFAULTUSER = str(AUTONAME) if AUTONAME else "DARK-COBRA"
@borg.on(admin_cmd(pattern=r"deploy"))
async def _(event):
if event.fwd_from:
return
animation_interval = 10
animation_ttl = range(0, 12)
# input_str = event.pattern_match.group(1)
await event.edit("Deploying...")
animation_chars = [
"**Heroku Connecting To Latest Github Build (Hellboi-atul/DARK COBRA)**",
"**Build started by user** **{DEFAULTUSER}**",
"**Deploy** `535a74f0` **by user** **{MY BOSS}**",
"**Restarting Heroku Server...**",
"**State changed from up to starting**",
"**Stopping all processes with SIGTERM**",
"**Process exited with** `status 143`",
"**Starting process with command** `python3 -m stdborg`",
"**State changed from starting to up**",
"__INFO:DARKCOBRA:Logged in as 557667062__",
"__INFO:DARKCOBRA:Successfully loaded all plugins__",
"**Build Succeeded**"
]
for i in animation_ttl:
await asyncio.sleep(animation_interval)
await event.edit(animation_chars[i % 12])
CMD_HELP.update(
{
"deploy": ".deploy"
"\nUsage show fake animation of deploy "
}
)