forked from Den4ikSuperOstryyPer4ik/Astro-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathпон_вахуи.py
99 lines (87 loc) · 3.43 KB
/
пон_вахуи.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# _ __ __ _ _
# /\ | | | \/ | | | | |
# / \ ___| |_ _ __ ___ | \ / | ___ __| |_ _| | ___ ___
# / /\ \ / __| __| '__/ _ \| |\/| |/ _ \ / _` | | | | |/ _ \/ __|
# / ____ \\__ \ |_| | | (_) | | | | (_) | (_| | |_| | | __/\__ \
# /_/ \_\___/\__|_| \___/|_| |_|\___/ \__,_|\__,_|_|\___||___/
#
# © Copyright 2022
#
# https://t.me/Den4ikSuperOstryyPer4ik
# and
# https://t.me/ToXicUse
#
# 🔒 Licensed under the GNU AGPLv3
# https://www.gnu.org/licenses/agpl-3.0.html
# meta developer: @AstroModules
# scope: hikka_only
# scope: hikka_min 1.3.0
import random
import typing
from .. import loader
@loader.tds
class ПонВахуиMod(loader.Module):
"""пон и вахуи"""
strings = {"name": "ПОН-ВАХУИ"}
@loader.command()
async def пон(self, message):
"""--> инлайн меню со стикерами пон"""
reply = await message.get_reply_message()
await self.inline.form(
message=message,
text="👇<b>пон</b>👇",
reply_markup=[
[
{
"text": "пон",
"callback": self.open_menu_pon,
"kwargs": {"chat_id": message.chat_id, "reply_to": reply.id if reply else None}
}
]
],
)
@loader.command()
async def вахуи(self, message):
"""--> инлайн меню со стикерами "вахуи" """
reply = await message.get_reply_message()
await self.inline.form(
message=message,
text="👇<b>вахуи</b>👇",
reply_markup=[
[
{
"text": "вахуи",
"callback": self.open_menu_vahui,
"kwargs": {"chat_id": message.chat_id, "reply_to": reply.id if reply else None}
}
]
],
)
async def send_sticker_pon(self, chat_id, reply_to: typing.Optional[int] = None):
m = await self.client.get_messages("@newpcfreesimulator", ids=random.randint(1, 500))
await self.client.send_message(chat_id, file=m, reply_to=reply_to)
async def send_sticker_vahui(self, chat_id, reply_to: typing.Optional[int] = None):
m = await self.client.get_messages("@VAHUI_STICKS", ids=random.randint(1, 100))
await self.client.send_message(chat_id, file=m, reply_to=reply_to)
async def open_menu_pon(self, call, chat_id, reply_to: typing.Optional[int] = None):
await call.edit(
text="<b>пон</b>",
reply_markup=[
[
{"text": "пон", "callback": self.send_sticker_pon, "kwargs": {"chat_id": chat_id, "reply_to": reply_to}}
for __ in range(7)
]
for _ in range(3)
],
)
async def open_menu_vahui(self, call):
await call.edit(
text="<b>вахуи</b>",
reply_markup=[
[
{"text": "вахуи", "callback": self.send_sticker_vahui, "kwargs": {"chat_id": chat_id, "reply_to": reply_to}}
for __ in range(7)
]
for _ in range(3)
],
)