forked from aykhan026/MusicUserBot
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ryuk_time.py
80 lines (71 loc) · 2.85 KB
/
ryuk_time.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
# Ballasresmi - MusicUserBot
# Burdan hər hansı modulu kodu faylı reponu
# Kopyalayan peysərdi..!!!!
# Sahib - @BOT_RAMO
import asyncio
from time import time
from datetime import datetime
from pyrogram import Client, filters
from pyrogram.types import Message
from ᴍɪꜱᴀ_ᴀᴍᴀɴᴇ.life_death import *
from ᴋɪʀᴀ_ʟɪɢʜᴛ.pyro_auth import Li
DYNO_COMMAND = Li.DYNO_COMMAND
"""
\____/ / \ \____/ / \ \____/ / \ \____/ / \ \____/ / \ \____/ /
/ __ \ \__/ / __ \ \__/ / __ \ \__/ / __ \ \__/ / __ \ \__/ / __ \ \_
"""
START_TIME = datetime.utcnow()
START_TIME_ISO = START_TIME.replace(microsecond=0).isoformat()
TIME_DURATION_UNITS = (
('week', 60 * 60 * 24 * 7),
('day', 60 * 60 * 24),
('hour', 60 * 60),
('min', 60),
('sec', 1)
)
self_or_contact_filter = filters.create(
lambda
_,
__,
ryui:
(ryui.from_user and ryui.from_user.is_contact) or ryui.outgoing
)
"""
\____/ / \ \____/ / \ \____/ / \ \____/ / \ \____/ / \ \____/ /
/ __ \ \__/ / __ \ \__/ / __ \ \__/ / __ \ \__/ / __ \ \__/ / __ \ \_
"""
@Client.on_message(filters.text
& self_or_contact_filter
& ~filters.edited
& ~filters.via_bot
& filters.command("ryuk", prefixes=DYNO_COMMAND)
)
async def ping_pong(_, ryui: Message):
start = time()
pwn = await ryui.reply_text("Sinxronzasiya olunur @Ballasresmi", True)
await pwn.edit_text("Serverlə əlaqə qurulur...")
await pwn.edit_text("♻️ Yüklənir [░░░░░░ ]")
await pwn.edit_text("♻️ Yüklənir [░░░░░░░░░░░░ ]")
await pwn.edit_text("♻️ Yüklənir [░░░░░░░░░░░░░░░░░░░░]")
delta_ping = time() - start
hawk = await pwn.edit_text(
f"""**Ballasresmi** 👨🏻💻 @BOT_RAMO\n
**Bəli, Mən aktivəm**:
`{delta_ping * 1000:.3f}ms`"""
)
await delete_ryuk((hawk, ryui), RYUKDEL)
return
"+|==========================================🍁----------[-_-]----------🍁==============================================|+"
async def delete_ryuk(messages: tuple, delay: int):
await asyncio.sleep(delay)
for msg in messages:
await msg.delete()
"""
\ / \ / \ / \ / \ / \
\__/ \__/ \__/ \__/ \__/ \__/
/ \ / \ / \ / \ / \ / \
🇦🇿👉 \ BOT_RAMO \ bu tağı hələ çox yerdə görəcəksiniz...) /
__/ \__/ \__/ \__/ \__/ \__/
\ / \ / \ / \ / \ / \
\__/ \__/ \__/ \__/ \__/ \__/
"""