-
Notifications
You must be signed in to change notification settings - Fork 1
/
stats.py
167 lines (154 loc) · 4.11 KB
/
stats.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
from AnonX import app
def back_stats_markup(_):
upl = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text=_["BACK_BUTTON"],
callback_data="TOPMARKUPGET",
),
InlineKeyboardButton(
text=_["CLOSE_BUTTON"],
callback_data="close",
),
],
]
)
return upl
def overallback_stats_markup(_):
upl = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text=_["BACK_BUTTON"],
callback_data="GlobalStats",
),
InlineKeyboardButton(
text=_["CLOSE_BUTTON"],
callback_data="close",
),
],
]
)
return upl
def get_stats_markup(_, status):
not_sudo = [
InlineKeyboardButton(
text=_["CLOSEMENU_BUTTON"],
callback_data="close",
)
]
sudo = [
InlineKeyboardButton(
text=_["SA_B_8"],
callback_data="bot_stats_sudo g",
),
InlineKeyboardButton(
text=_["CLOSEMENU_BUTTON"],
callback_data="close",
),
]
upl = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text=_["SA_B_7"],
callback_data="TOPMARKUPGET",
)
],
[
InlineKeyboardButton(
text=_["SA_B_6"],
url=f"https://t.me/{app.username}?start=stats",
),
InlineKeyboardButton(
text=_["SA_B_5"],
callback_data="TopOverall g",
),
],
sudo if status else not_sudo,
]
)
return upl
def stats_buttons(_, status):
not_sudo = [
InlineKeyboardButton(
text=_["SA_B_5"],
callback_data="TopOverall s",
)
]
sudo = [
InlineKeyboardButton(
text=_["SA_B_8"],
callback_data="bot_stats_sudo s",
),
InlineKeyboardButton(
text=_["SA_B_5"],
callback_data="TopOverall s",
),
]
upl = InlineKeyboardMarkup(
[
sudo if status else not_sudo,
[
InlineKeyboardButton(
text=_["CLOSE_BUTTON"],
callback_data="close",
),
],
]
)
return upl
def back_stats_buttons(_):
upl = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text=_["BACK_BUTTON"],
callback_data="GETSTATS",
),
InlineKeyboardButton(
text=_["CLOSE_BUTTON"],
callback_data="close",
),
],
]
)
return upl
def top_ten_stats_markup(_):
upl = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
text=_["SA_B_2"],
callback_data="GetStatsNow Tracks",
),
InlineKeyboardButton(
text=_["SA_B_1"],
callback_data="GetStatsNow Chats",
),
],
[
InlineKeyboardButton(
text=_["SA_B_3"],
callback_data="GetStatsNow Users",
),
InlineKeyboardButton(
text=_["SA_B_4"],
callback_data="GetStatsNow Here",
),
],
[
InlineKeyboardButton(
text=_["BACK_BUTTON"],
callback_data="GlobalStats",
),
InlineKeyboardButton(
text=_["CLOSE_BUTTON"],
callback_data="close",
),
],
]
)
return upl