-
Notifications
You must be signed in to change notification settings - Fork 22
/
1000-7.py
43 lines (29 loc) · 1.03 KB
/
1000-7.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
from asyncio import sleep
from pyrogram import Client, filters
from pyrogram.types import Message
from utils.misc import modules_help, prefix
digits = {
str(i): el
for i, el in enumerate(
["0️⃣", "1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣"]
)
}
def prettify(val: int) -> str:
return "".join(digits[i] for i in str(val))
@Client.on_message(filters.command("ghoul", prefix) & filters.me)
async def ghoul_counter(_, message: Message):
await message.delete()
if len(message.command) > 1 and message.command[1].isdigit():
counter = int(message.command[1])
else:
counter = 1000
msg = await message.reply(prettify(counter), quote=False)
await sleep(1)
while counter // 7:
counter -= 7
await msg.edit(prettify(counter))
await sleep(1)
await msg.edit("<b>🤡 ГУЛЬ 🤡</b>")
modules_help["1000-7"] = {
"ghoul [count_from]": "counting from 1000 (or given [count_from] to 0 as a ghoul"
}