-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathTgsKiller.py
More file actions
49 lines (37 loc) · 1.29 KB
/
TgsKiller.py
File metadata and controls
49 lines (37 loc) · 1.29 KB
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
import logging, os
from random import choice, randint
from .. import loader, utils
logger = logging.getLogger(__name__)
@loader.tds
class TgsKillerMod(loader.Module):
"""Хуярит"""
strings = {"name": "TgsKiller"}
@loader.unrestricted
async def tgscmd(self, message):
"""хуярит стикеры"""
reply = await message.get_reply_message()
if not reply:
await message.edit("Реплай на стикер анимированный")
return
if not reply.file:
await message.edit("Реплай на стикер анимированный")
return
if not reply.file.name.endswith(".tgs"):
await message.edit("Реплай на стикер анимированный")
return
await message.edit("///Пахуярили нахуй!///")
await reply.download_media("tgs.tgs")
os.system("lottie_convert.py tgs.tgs json.json")
with open("json.json","r") as f:
stick = f.read()
f.close()
for i in range(1, randint(6, 10)):
stick = choice([stick.replace(f'[{i}]', f'[{(i+i)*3}]'), stick.replace(f'.{i}', f'.{i}{i}')])
with open("json.json","w") as f:
f.write(stick)
f.close()
os.system("lottie_convert.py json.json tgs.tgs")
await reply.reply(file="tgs.tgs")
os.remove("tgs.tgs")
os.remove("json.json")
await message.delete()