File size: 17,632 Bytes
78b07ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
import random

from pyrogram import Client
from pyrogram.enums import ChatMembersFilter, ChatMemberStatus
from pyrogram.types import Message

from Hellbot.functions.media import get_media_fileid
from Hellbot.functions.templates import chat_info_templates

from . import HelpMenu, group_n_channel, hellbot, on_message

kickme_quotes = [
    "โœŒ๏ธ ๐–ฎ๐—Ž๐—๐—๐–บ ๐—๐–พ๐—‹๐–พ, ๐—…๐–พ๐–บ๐—๐—‚๐—‡๐—€ ๐—๐—๐–พ ๐—Œ๐—๐–บ๐—€๐–พ ๐—๐—ˆ ๐—๐—๐–พ ๐—‹๐–พ๐–บ๐—… ๐—Œ๐—๐–บ๐—‹๐—Œ!",
    "๐Ÿš€ ๐–ค๐—…๐–พ๐—๐–บ๐—๐—‚๐—‡๐—€ ๐—†๐—’ ๐—๐—‚๐–ป๐–พ๐—Œ, ๐—…๐–พ๐–บ๐—๐—‚๐—‡๐—€ ๐—๐—๐–พ ๐–ผ๐—๐–บ๐— ๐—‚๐—‡ ๐—Œ๐—๐—’๐—…๐–พ.",
    "๐Ÿ•Š๏ธ ๐–ฅ๐—…๐—’๐—‚๐—‡๐—€ ๐—Œ๐—ˆ๐—…๐—ˆ, ๐–พ๐—‘๐—‚๐—๐—‚๐—‡๐—€ ๐—๐—๐—‚๐—Œ ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐—€๐—‹๐–บ๐–ผ๐–พ๐–ฟ๐—Ž๐—…๐—…๐—’.",
    "๐ŸŒช๏ธ ๐–ฒ๐—๐—‚๐—‹๐—‹๐—‚๐—‡๐—€ ๐—Ž๐—‰ ๐—๐—๐–พ ๐—๐—‚๐—‡๐–ฝ๐—Œ ๐—ˆ๐–ฟ ๐–ฝ๐–พ๐—‰๐–บ๐—‹๐—๐—Ž๐—‹๐–พ, ๐–ป๐—’๐–พ!",
    "๐Ÿšถโ€โ™‚๏ธ ๐–ถ๐–บ๐—…๐—„๐—‚๐—‡๐—€ ๐–บ๐—๐–บ๐—’ ๐—…๐—‚๐—„๐–พ ๐–บ ๐–ป๐—ˆ๐—Œ๐—Œ, ๐—Œ๐–พ๐–พ ๐—’๐—ˆ๐—Ž ๐—‡๐–พ๐—๐–พ๐—‹!",
    "๐Ÿ”ฅ ๐–ก๐—Ž๐—‹๐—‡๐—‚๐—‡๐—€ ๐–ป๐—‹๐—‚๐–ฝ๐—€๐–พ๐—Œ ๐–บ๐—‡๐–ฝ ๐–ผ๐—‹๐–พ๐–บ๐—๐—‚๐—‡๐—€ ๐—†๐—’ ๐—ˆ๐—๐—‡ ๐—‰๐–บ๐—๐—. ๐– ๐–ฝ๐—‚๐—ˆ๐—Œ!",
    "๐Ÿ’ซ ๐–ณ๐—Ž๐—‹๐—‡๐—‚๐—‡๐—€ ๐—๐—๐–พ ๐—‰๐–บ๐—€๐–พ ๐–บ๐—‡๐–ฝ ๐–ผ๐—…๐—ˆ๐—Œ๐—‚๐—‡๐—€ ๐—๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐—‰๐—๐–พ๐—‹.",
    "๐Ÿ‘‘ ๐–ข๐—‹๐—ˆ๐—๐—‡'๐—Œ ๐—๐—ˆ๐—ˆ ๐—๐–พ๐–บ๐—๐—’ ๐–ฟ๐—ˆ๐—‹ ๐—๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐—. ๐–จ'๐—† ๐—ˆ๐—Ž๐—!",
    "๐Ÿƒโ€โ™‚๏ธ ๐–ฒ๐—‰๐—‹๐—‚๐—‡๐—๐—‚๐—‡๐—€ ๐—ˆ๐—Ž๐— ๐—ˆ๐–ฟ ๐—๐–พ๐—‹๐–พ ๐—๐—‚๐—๐— ๐–ฟ๐—…๐–บ๐—‚๐—‹. ๐–ข๐–บ๐—๐–ผ๐— ๐—’๐—ˆ๐—Ž ๐—‡๐–พ๐—๐–พ๐—‹!",
    "๐Ÿšค ๐–ฒ๐–บ๐—‚๐—…๐—‚๐—‡๐—€ ๐–บ๐—๐–บ๐—’ ๐–ฟ๐—‹๐—ˆ๐—† ๐—๐—๐—‚๐—Œ ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐–ผ๐—๐–บ๐—, ๐—Œ๐—†๐—ˆ๐—ˆ๐—๐— ๐—Œ๐–พ๐–บ๐—Œ ๐–บ๐—๐–พ๐–บ๐–ฝ!",
    "๐Ÿƒ ๐–ซ๐—‚๐—„๐–พ ๐–บ ๐—…๐–พ๐–บ๐–ฟ ๐—‚๐—‡ ๐—๐—๐–พ ๐—๐—‚๐—‡๐–ฝ, ๐–จ'๐—† ๐–ฝ๐—‹๐—‚๐–ฟ๐—๐—‚๐—‡๐—€ ๐–บ๐—๐–บ๐—’. ๐–ฅ๐–บ๐—‹๐–พ๐—๐–พ๐—…๐—…!",
    "๐Ÿ›ซ ๐–ณ๐–บ๐—„๐—‚๐—‡๐—€ ๐—ˆ๐–ฟ๐–ฟ ๐–ฟ๐—‹๐—ˆ๐—† ๐—๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐— ๐—‹๐—Ž๐—‡๐—๐–บ๐—’. ๐–ก๐—ˆ๐—‡ ๐—๐—ˆ๐—’๐–บ๐—€๐–พ!",
    "๐Ÿ’ผ ๐–ข๐—…๐—ˆ๐—Œ๐—‚๐—‡๐—€ ๐—๐—๐–พ ๐–ป๐—‹๐—‚๐–พ๐–ฟ๐–ผ๐–บ๐—Œ๐–พ ๐—ˆ๐—‡ ๐—๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐—. ๐–ฏ๐—‹๐—ˆ๐–ฟ๐–พ๐—Œ๐—Œ๐—‚๐—ˆ๐—‡๐–บ๐—… ๐–พ๐—‘๐—‚๐—!",
    "๐ŸŽญ ๐–ค๐—‘๐—‚๐—๐—‚๐—‡๐—€ ๐—๐—๐–พ ๐—Œ๐—๐–บ๐—€๐–พ ๐—๐—‚๐—๐— ๐–บ ๐–ฝ๐—‹๐–บ๐—†๐–บ๐—๐—‚๐–ผ ๐–ฟ๐—…๐–บ๐—‚๐—‹. ๐–ณ๐–บ-๐–ฝ๐–บ!",
    "๐ŸŽถ ๐–ฏ๐—…๐–บ๐—’๐—‚๐—‡๐—€ ๐—†๐—’ ๐–พ๐—‘๐—‚๐— ๐—†๐—Ž๐—Œ๐—‚๐–ผ. ๐–ข๐—Ž๐–พ ๐—๐—๐–พ ๐–ฟ๐–บ๐—‹๐–พ๐—๐–พ๐—…๐—… ๐—Œ๐—’๐—†๐—‰๐—๐—ˆ๐—‡๐—’!",
    "๐Ÿ•ถ๏ธ ๐–ฅ๐–บ๐–ฝ๐—‚๐—‡๐—€ ๐—‚๐—‡๐—๐—ˆ ๐—๐—๐–พ ๐—Œ๐—๐–บ๐–ฝ๐—ˆ๐—๐—Œ, ๐—…๐–พ๐–บ๐—๐—‚๐—‡๐—€ ๐–บ๐—‡ ๐–บ๐—‚๐—‹ ๐—ˆ๐–ฟ ๐—†๐—’๐—Œ๐—๐–พ๐—‹๐—’.",
    "๐Ÿšช ๐–ข๐—…๐—ˆ๐—Œ๐—‚๐—‡๐—€ ๐—๐—๐–พ ๐–ฝ๐—ˆ๐—ˆ๐—‹ ๐—Š๐—Ž๐—‚๐–พ๐—๐—…๐—’ ๐—ˆ๐—‡ ๐—๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐—. ๐–ค๐—‘๐—‚๐— ๐–ผ๐—ˆ๐—†๐—‰๐—…๐–พ๐—๐–พ!",
    "๐Ÿ”’ ๐–ซ๐—ˆ๐–ผ๐—„๐—‚๐—‡๐—€ ๐—๐—๐–พ ๐–ผ๐—๐–บ๐— ๐–ป๐–พ๐—๐—‚๐—‡๐–ฝ ๐—†๐–พ. ๐–ช๐–พ๐–พ๐—‰ ๐—‚๐— ๐—Œ๐—๐—’๐—…๐—‚๐—Œ๐—, ๐–ฟ๐—ˆ๐—…๐—„๐—Œ!",
    "๐ŸŒŒ ๐–ต๐–บ๐—‡๐—‚๐—Œ๐—๐—‚๐—‡๐—€ ๐—‚๐—‡๐—๐—ˆ ๐—๐—๐–พ ๐–ผ๐—ˆ๐—Œ๐—†๐—‚๐–ผ ๐–บ๐–ป๐—’๐—Œ๐—Œ. ๐–ฒ๐–พ๐–พ ๐—’๐—ˆ๐—Ž ๐—‚๐—‡ ๐—๐—๐–พ ๐—Œ๐—๐–บ๐—‹๐—Œ!",
    "๐Ÿ’” ๐–ก๐—‹๐–พ๐–บ๐—„๐—‚๐—‡๐—€ ๐–ฟ๐—‹๐–พ๐–พ ๐–ฟ๐—‹๐—ˆ๐—† ๐—๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐—. ๐–ด๐—‡๐—…๐–พ๐–บ๐—Œ๐—๐—‚๐—‡๐—€ ๐—†๐—’ ๐—Œ๐—ˆ๐—…๐—ˆ ๐—ƒ๐—ˆ๐—Ž๐—‹๐—‡๐–พ๐—’!",
    "๐Ÿ‘‘ ๐–ค๐—‘๐—‚๐—๐—‚๐—‡๐—€ ๐—€๐—‹๐–บ๐–ผ๐–พ๐–ฟ๐—Ž๐—…๐—…๐—’. ๐–ณ๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐— ๐–ผ๐—ˆ๐—Ž๐—…๐–ฝ๐—‡'๐— ๐—๐–บ๐—‡๐–ฝ๐—…๐–พ ๐—†๐—’ ๐—Œ๐—๐—’๐—…๐–พ.",
    "๐Ÿš€ ๐–ณ๐—‚๐—†๐–พ ๐–ฟ๐—ˆ๐—‹ ๐—†๐–พ ๐—๐—ˆ ๐–ป๐—…๐–บ๐—Œ๐— ๐—ˆ๐–ฟ๐–ฟ. ๐– ๐–ฝ๐—‚๐—ˆ๐—Œ, ๐–บ๐—†๐—‚๐—€๐—ˆ๐—Œ!",
    "๐ŸŒช๏ธ ๐–ฒ๐—๐—‚๐—‹๐—‹๐—‚๐—‡๐—€ ๐—Ž๐—‰ ๐—๐—๐–พ ๐–ฝ๐—‹๐–บ๐—†๐–บ ๐–บ๐—‡๐–ฝ ๐—†๐–บ๐—„๐—‚๐—‡๐—€ ๐—†๐—’ ๐–พ๐—‘๐—‚๐—.",
]


@on_message(

    "setgpic",

    chat_type=group_n_channel,

    admin_only=True,

    allow_stan=True,

)
async def setgpic(_, message: Message):
    if not message.reply_to_message or not message.reply_to_message.photo:
        return await hellbot.delete(
            message, "๐–ฑ๐–พ๐—‰๐—…๐—’ ๐—๐—ˆ ๐–บ ๐—‰๐—๐—ˆ๐—๐—ˆ ๐—๐—ˆ ๐—Œ๐–พ๐— ๐–บ๐—Œ ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐—‰๐—‹๐—ˆ๐–ฟ๐—‚๐—…๐–พ ๐—‰๐—‚๐–ผ๐—๐—Ž๐—‹๐–พ."
        )

    status = await message.chat.set_photo(photo=message.reply_to_message.photo.file_id)
    if not status:
        return await hellbot.delete(message, "๐–ฒ๐—ˆ๐—‹๐—‹๐—’, ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐–พ๐—‡๐— ๐—๐—‹๐—ˆ๐—‡๐—€.")

    await hellbot.delete(message, "๐–ฒ๐—Ž๐–ผ๐–ผ๐–พ๐—Œ๐—Œ๐–ฟ๐—Ž๐—…๐—…๐—’ ๐—Œ๐–พ๐— ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐—‰๐—‹๐—ˆ๐–ฟ๐—‚๐—…๐–พ ๐—‰๐—‚๐–ผ๐—๐—Ž๐—‹๐–พ.")
    await hellbot.check_and_log(
        "setgpic",
        f"**Group Profile Picture**\n\n**Group:** `{message.chat.title}`\n**Group ID:** `{message.chat.id}`\n**Admin:** `{message.from_user.mention}`",
    )


@on_message(

    "setgtitle",

    chat_type=group_n_channel,

    admin_only=True,

    allow_stan=True,

)
async def setgtitle(_, message: Message):
    if len(message.command) < 2:
        return await hellbot.delete(
            message, "๐–จ ๐—‡๐–พ๐–พ๐–ฝ ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐—ˆ ๐—Œ๐–พ๐— ๐—๐—๐—‚๐—Œ ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐—๐—‚๐—๐—…๐–พ."
        )

    prev_title = message.chat.title
    new_title = await hellbot.input(message)
    status = await message.chat.set_title(new_title)
    if not status:
        return await hellbot.delete(message, "๐–ฒ๐—ˆ๐—‹๐—‹๐—’, ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐–พ๐—‡๐— ๐—๐—‹๐—ˆ๐—‡๐—€.")

    await hellbot.delete(message, "๐–ฒ๐—Ž๐–ผ๐–ผ๐–พ๐—Œ๐—Œ๐–ฟ๐—Ž๐—…๐—…๐—’ ๐—Œ๐–พ๐— ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐—๐—‚๐—๐—…๐–พ.")
    await hellbot.check_and_log(
        "setgtitle",
        f"**Group Title**\n\n**Group:** `{prev_title}`\n**Group ID:** `{message.chat.id}`\n**Admin:** `{message.from_user.mention}`",
    )


@on_message(

    "setgabout",

    chat_type=group_n_channel,

    admin_only=True,

    allow_stan=True,

)
async def setgabout(_, message: Message):
    if len(message.command) < 2:
        return await hellbot.delete(
            message, "๐–จ ๐—‡๐–พ๐–พ๐–ฝ ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐—ˆ ๐—Œ๐–พ๐— ๐—๐—๐—‚๐—Œ ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐–บ๐–ป๐—ˆ๐—Ž๐—."
        )

    new_about = await hellbot.input(message)
    status = await message.chat.set_description(new_about)
    if not status:
        return await hellbot.delete(message, "๐–ฒ๐—ˆ๐—‹๐—‹๐—’, ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐–พ๐—‡๐— ๐—๐—‹๐—ˆ๐—‡๐—€.")

    await hellbot.delete(message, "๐–ฒ๐—Ž๐–ผ๐–ผ๐–พ๐—Œ๐—Œ๐–ฟ๐—Ž๐—…๐—…๐—’ ๐—Œ๐–พ๐— ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐–บ๐–ป๐—ˆ๐—Ž๐—.")
    await hellbot.check_and_log(
        "setgabout",
        f"**Group About**\n\n**Group:** `{message.chat.title}`\n**Group ID:** `{message.chat.id}`\n**Admin:** `{message.from_user.mention}`",
    )


@on_message(

    "setgusername",

    chat_type=group_n_channel,

    admin_only=True,

    allow_stan=True,

)
async def setgusername(client: Client, message: Message):
    user_status = (await message.chat.get_member(message.from_user.id)).status
    if user_status != ChatMemberStatus.OWNER:
        return await hellbot.delete(message, "๐–จ ๐–บ๐—† ๐—‡๐—ˆ๐— ๐—๐—๐–พ ๐—ˆ๐—๐—‡๐–พ๐—‹ ๐—ˆ๐–ฟ ๐—๐—๐—‚๐—Œ ๐—€๐—‹๐—ˆ๐—Ž๐—‰.")

    if len(message.command) < 2:
        return await hellbot.delete(
            message, "๐–จ ๐—‡๐–พ๐–พ๐–ฝ ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐—ˆ ๐—Œ๐–พ๐— ๐—๐—๐—‚๐—Œ ๐—€๐—‹๐—ˆ๐—Ž๐—‰'๐—Œ ๐—Ž๐—Œ๐–พ๐—‹๐—‡๐–บ๐—†๐–พ."
        )

    new_username = await hellbot.input(message)
    status = await client.set_chat_username(message.chat.id, new_username)
    if not status:
        return await hellbot.delete(message, "๐–ฒ๐—ˆ๐—‹๐—‹๐—’, ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐–พ๐—‡๐— ๐—๐—‹๐—ˆ๐—‡๐—€.")

    await hellbot.delete(message, "๐–ฒ๐—Ž๐–ผ๐–ผ๐–พ๐—Œ๐—Œ๐–ฟ๐—Ž๐—…๐—…๐—’ ๐—Œ๐–พ๐— ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐—Ž๐—Œ๐–พ๐—‹๐—‡๐–บ๐—†๐–พ.")
    await hellbot.check_and_log(
        "setgusername",
        f"**Group Username**\n\n**Group:** `{message.chat.title}`\n**Group ID:** `{message.chat.id}`\n**Admin:** `{message.from_user.mention}`",
    )


@on_message(

    "getglink",

    chat_type=group_n_channel,

    admin_only=True,

    allow_stan=True,

)
async def getglink(_, message: Message):
    link = await message.chat.export_invite_link()
    await hellbot.delete(message, f"**๐–ฆ๐—‹๐—ˆ๐—Ž๐—‰ ๐—…๐—‚๐—‡๐—„:** `{link}`")


@on_message("kickme", chat_type=group_n_channel, allow_stan=True)
async def kickme(client: Client, message: Message):
    hell = await hellbot.edit(message, random.choice(kickme_quotes))
    try:
        await client.leave_chat(message.chat.id)
    except Exception as e:
        return await hellbot.delete(
            hell, f"Deym! Can't leave this chat.\n**Error:** `{e}`"
        )


@on_message("newgroup", allow_stan=True)
async def new_group(client: Client, message: Message):
    if len(message.command) < 2:
        return await hellbot.delete(message, "๐–จ ๐—‡๐–พ๐–พ๐–ฝ ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐—ˆ ๐—Œ๐–พ๐— ๐–บ๐—Œ ๐—€๐—‹๐—ˆ๐—Ž๐—‰ ๐—๐—‚๐—๐—…๐–พ.")

    new_title = await hellbot.input(message)

    try:
        new_group = await client.create_group(new_title, hellbot.bot.me.id)
        await hellbot.edit(
            message, f"**๐–ฆ๐—‹๐—ˆ๐—Ž๐—‰ ๐—…๐—‚๐—‡๐—„:** [{new_group.title}]({new_group.invite_link})"
        )
    except Exception as e:
        await hellbot.error(message, f"`{e}`", 20)


@on_message("newchannel", allow_stan=True)
async def new_channel(client: Client, message: Message):
    if len(message.command) < 2:
        return await hellbot.delete(
            message, "๐–จ ๐—‡๐–พ๐–พ๐–ฝ ๐—Œ๐—ˆ๐—†๐–พ๐—๐—๐—‚๐—‡๐—€ ๐—๐—ˆ ๐—Œ๐–พ๐— ๐–บ๐—Œ ๐–ผ๐—๐–บ๐—‡๐—‡๐–พ๐—… ๐—๐—‚๐—๐—…๐–พ."
        )

    new_title = await hellbot.input(message)

    try:
        new_channel = await client.create_channel(new_title, "Created by HellBot")
        await hellbot.edit(
            message, f"**๐–ข๐—๐–บ๐—‡๐—‡๐–พ๐—… ๐—…๐—‚๐—‡๐—„:** [{new_channel.title}]({new_channel.username})"
        )
    except Exception as e:
        await hellbot.error(message, f"`{e}`", 20)


@on_message("chatinfo", allow_stan=True)
async def chatInfo(client: Client, message: Message):
    if len(message.command) > 1:
        try:
            chat = await client.get_chat(message.command[1])
        except Exception as e:
            return await hellbot.error(message, f"`{e}`")
    else:
        chat = message.chat

    hell = await hellbot.edit(message, "Fetching chat info...")

    if chat.invite_link:
        chat_link = f"[Invite Link]({chat.invite_link})"
    elif chat.username:
        chat_link = f"@{chat.username}"
    else:
        chat_link = "Private Chat"

    chat_owner = None
    admins_count = 0
    bots_count = 0

    async for admin in client.get_chat_members(
        chat.id, filter=ChatMembersFilter.ADMINISTRATORS
    ):
        admins_count += 1
        if admin.status == ChatMemberStatus.OWNER:
            chat_owner = admin.user.mention

    async for _ in client.get_chat_members(chat.id, filter=ChatMembersFilter.BOTS):
        bots_count += 1

    chat_info = await chat_info_templates(
        chatName=chat.title,
        chatId=chat.id,
        chatLink=chat_link,
        chatOwner=chat_owner,
        dcId=chat.dc_id,
        membersCount=chat.members_count,
        adminsCount=admins_count,
        botsCount=bots_count,
        description=chat.description,
    )

    if chat.photo:
        async for photo in client.get_chat_photos(chat.id, 1):
            await hell.delete()
            await client.send_photo(
                message.chat.id,
                photo.file_id,
                caption=chat_info,
                reply_to_message_id=message.id,
                disable_notification=True,
            )
            return
    else:
        await hell.edit(chat_info, disable_web_page_preview=True)


@on_message("chatadmins", allow_stan=True)
async def chatAdmins(client: Client, message: Message):
    if len(message.command) < 2:
        chat = message.chat
    else:
        try:
            chat = await client.get_chat(message.command[1])
        except Exception as e:
            return await hellbot.error(message, f"`{e}`")

    hell = await hellbot.edit(message, "Fetching chat admins...")

    admin_count = 0
    admins = "**๐Ÿ’ซ ๐– ๐–ฝ๐—†๐—‚๐—‡๐—Œ ๐—‚๐—‡ ๐—๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐—:**\n\n"
    async for admin in client.get_chat_members(
        chat.id, filter=ChatMembersFilter.ADMINISTRATORS
    ):
        admin_count += 1
        admins += f"**{'0' if admin_count < 10 else ''}{admin_count}:** {admin.user.mention} - `{admin.status}`\n"

    await hell.edit(admins, disable_web_page_preview=True)


@on_message("chatbots", allow_stan=True)
async def chatBots(client: Client, message: Message):
    if len(message.command) < 2:
        chat = message.chat
    else:
        try:
            chat = await client.get_chat(message.command[1])
        except Exception as e:
            return await hellbot.error(message, f"`{e}`")

    hell = await hellbot.edit(message, "Fetching chat bots...")

    bot_count = 0
    bots = "**๐Ÿค– ๐–ก๐—ˆ๐—๐—Œ ๐—‚๐—‡ ๐—๐—๐—‚๐—Œ ๐–ผ๐—๐–บ๐—:**\n\n"
    async for bot in client.get_chat_members(chat.id, filter=ChatMembersFilter.BOTS):
        bot_count += 1
        bots += (
            f"**{'0' if bot_count < 10 else ''}{bot_count}:** @{bot.user.username}\n"
        )

    await hell.edit(bots, disable_web_page_preview=True)


@on_message("id", allow_stan=True)
async def chatId(_, message: Message):
    if message.reply_to_message:
        msg = message.reply_to_message
    else:
        msg = message

    hell = await hellbot.edit(message, "Fetching message info...")

    info = f"**๐Ÿ’ซ ChatID:** `{msg.chat.id}`\n"
    info += f"**๐Ÿชช MessageID:** `{msg.id}`\n\n"

    if msg.from_user:
        info += f"**๐Ÿ‘ค UserID:** `{msg.from_user.id}`\n\n"

    if msg.forward_from:
        info += f"**๐Ÿ‘ค Forwarded From:** `{msg.forward_from.id}`\n\n"

    if msg.forward_from_chat:
        info += f"**๐Ÿ’ซ Forwarded ChatID:** `{msg.forward_from_chat.id}`\n\n"

    file_id = await get_media_fileid(msg)
    if file_id:
        info += f"**๐Ÿ“ FileID:** `{file_id}`\n\n"

    await hell.edit(info, disable_web_page_preview=True)


@on_message("invite", allow_stan=True)
async def inviteUser(client: Client, message: Message):
    if len(message.command) < 2:
        return await hellbot.delete(
            message, "I need a username/id to invite to this chat."
        )

    users = (await hellbot.input(message)).split(" ")
    hell = await hellbot.edit(message, "Inviting users...")

    resolved_users = await client.get_users(users)
    await message.chat.add_members([user.id for user in resolved_users])

    await hell.edit("Successfully invited users to this chat.")


HelpMenu("groups").add(
    "setgpic", "<reply to photo>", "Set the group profile picture.", "setgpic"
).add("setgtitle", "<title>", "Set the group title.", "setgtitle chat group").add(
    "setgabout",
    "<text>",
    "Set the group description/about",
    "setgabout some group description",
).add(
    "setgusername",
    "<username>",
    "Set the group username.",
    "setgusername HellBot_Chats",
    "Only group owners can use this command. Give username without '@'.",
).add(
    "getglink", None, "Get the group invite link.", "getglink"
).add(
    "kickme", None, "Leave the chat in swag ๐Ÿ˜Ž!", "kickme"
).add(
    "newgroup", "<title>", "Create a new group.", "newgroup HellBot Group"
).add(
    "newchannel", "<title>", "Create a new channel.", "newchannel HellBot Channel"
).add(
    "chatinfo", "<chat id (optional)>", "Get info about the chat.", "chatinfo"
).add(
    "chatadmins",
    "<chat id (optional)>",
    "Get the list of admins of mentioned chat.",
    "chatadmins @Hellbot_Chats",
).add(
    "chatbots",
    "<chat id (optional)>",
    "Get the list of bots of mentioned chat.",
    "chatbots @Hellbot_Chats",
).add(
    "id",
    "<reply to message (optional)>",
    "Get the ID of the replied message, replied user, and more.",
    "id",
).add(
    "invite",
    "<username/id>",
    "Invite the mentioned user to this chat.",
    "invite @ForGo10God",
    "You can invite multiple users by giving their username/id separated by space.",
).info(
    "Group Menu"
).done()