iamgojoof6eyes commited on
Commit
9da6fea
·
1 Parent(s): d0b30c9

Help inline fix may be

Browse files
Powers/__init__.py CHANGED
@@ -104,6 +104,7 @@ async def load_cmds(all_plugins):
104
 
105
  plugin_name = imported_module.__PLUGIN__.lower()
106
  plugin_dict_name = f"plugins.{plugin_name}.main"
 
107
 
108
  if plugin_dict_name in HELP_COMMANDS:
109
  raise Exception(
@@ -117,7 +118,7 @@ async def load_cmds(all_plugins):
117
  "buttons": [],
118
  "disablable": [],
119
  "alt_cmds": [],
120
- "help_msg": f"plugins.{plugin_name}.help",
121
  }
122
 
123
  if hasattr(imported_module, "__buttons__"):
 
104
 
105
  plugin_name = imported_module.__PLUGIN__.lower()
106
  plugin_dict_name = f"plugins.{plugin_name}.main"
107
+ plugin_help = imported_module.__HELP__
108
 
109
  if plugin_dict_name in HELP_COMMANDS:
110
  raise Exception(
 
118
  "buttons": [],
119
  "disablable": [],
120
  "alt_cmds": [],
121
+ "help_msg": plugin_help,
122
  }
123
 
124
  if hasattr(imported_module, "__buttons__"):
Powers/plugins/admin.py CHANGED
@@ -551,3 +551,25 @@ __alt_name__ = [
551
  "setgdes",
552
  "zombies",
553
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
551
  "setgdes",
552
  "zombies",
553
  ]
554
+
555
+ __HELP__ = """Lazy to promote or demote someone for admins? Want to see basic information about chat?
556
+ All stuff about chatroom such as admin lists, pinning or grabbing an invite link can be done easily using the bot.
557
+ **User Commands:**
558
+ × /adminlist: List all the admins in the Group.
559
+ **Admin only:**
560
+ × /invitelink: Gets chat invitelink.
561
+ × /promote: Promotes the user replied to or tagged (supports with title).
562
+ × /fullpromote: Fully Promotes the user replied to or tagged (supports with title).
563
+ × /demote: Demotes the user replied to or tagged.
564
+ × /admincache: Reloads the List of all the admins in the Group.
565
+ × /zombies: Bans all the deleted accounts. (owner only)
566
+ × /title: sets a custom title for an admin that the bot promoted.
567
+ × /disable <commandname>: Stop users from using "commandname" in this group.
568
+ × /enable <item name>: Allow users from using "commandname" in this group.
569
+ × /disableable: List all disableable commands.
570
+ × /disabledel <yes/off>: Delete disabled commands when used by non-admins.
571
+ × /disabled: List the disabled commands in this chat.
572
+ × /enableall: enable all disabled commands.
573
+
574
+ **Example:**
575
+ `/promote @username`: this promotes a user to admin."""
Powers/plugins/antispam.py CHANGED
@@ -164,3 +164,4 @@ async def gban_list(_, m: Message):
164
  LOGGER.info(f"{m.from_user.id} exported gbanlist in {m.chat.id}")
165
 
166
  return
 
 
164
  LOGGER.info(f"{m.from_user.id} exported gbanlist in {m.chat.id}")
165
 
166
  return
167
+
Powers/plugins/approve.py CHANGED
@@ -232,3 +232,16 @@ __PLUGIN__ = "approve"
232
  _DISABLE_CMDS_ = ["approval"]
233
 
234
  __alt_name__ = ["approved"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  _DISABLE_CMDS_ = ["approval"]
233
 
234
  __alt_name__ = ["approved"]
235
+
236
+
237
+ __HELP__ = """Sometimes, you might trust a user not to send unwanted content.
238
+ Maybe not enough to make them admin, but you might be ok with locks, blacklists, and antiflood not applying to them.
239
+ That's what approvals are for - approve trustworthy users to allow them to send stuff without restrictions!
240
+ **Admin commands:**
241
+ × /approval: Check a user's approval status in this chat.
242
+ × /approve: Approve of a user. Locks, blacklists, and antiflood won't apply to them anymore.
243
+ × /unapprove: Unapprove of a user. They will now be subject to blocklists.
244
+ × /approved: List all approved users.
245
+ × /unapproveall: Unapprove *ALL* users in a chat. This cannot be undone!
246
+ **Example:**
247
+ `/approve @username`: this approves a user in the chat."""
Powers/plugins/bans.py CHANGED
@@ -879,3 +879,20 @@ __alt_name__ = [
879
  "kick",
880
  "tban",
881
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
879
  "kick",
880
  "tban",
881
  ]
882
+
883
+ __HELP__ = """Someone annoying entered your group?
884
+ Want to ban/restriction him/her?
885
+ This is the plugin for you, easily kick, ban and unban members in a group.
886
+ **Admin only:**
887
+ × /kick: Kick the user replied or tagged.
888
+ × /skick: Kick the user replied or tagged and delete your messsage.
889
+ × /dkick: Kick the user replied and delete their message.
890
+ × /ban: Bans the user replied to or tagged.
891
+ × /sban: Bans the user replied or tagged and delete your messsage.
892
+ × /dban: Bans the user replied and delete their message.
893
+ × /tban <userhandle> x(m/h/d): Bans a user for x time. (via handle, or reply). m = minutes, h = hours, d = days.
894
+ × /stban <userhandle> x(m/h/d): Silently bans a user for x time. (via handle, or reply). m = minutes, h = hours, d = days.
895
+ × /dtban <userhandle> x(m/h/d): Silently bans a user for x time and delete the replied message. (via reply). m = minutes, h = hours, d = days.
896
+ × /unban: Unbans the user replied to or tagged.
897
+ **Example:**
898
+ `/ban @username`: this bans a user in the chat."""
Powers/plugins/blacklist.py CHANGED
@@ -208,3 +208,19 @@ async def rm_allbl_callback(_, q: CallbackQuery):
208
  __PLUGIN__ = "blacklist"
209
 
210
  __alt_name__ = ["blacklists", "blaction"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  __PLUGIN__ = "blacklist"
209
 
210
  __alt_name__ = ["blacklists", "blaction"]
211
+
212
+ __HELP__ = """Want to restrict certain words or sentences in your group?
213
+ Blacklists are used to stop certain triggers from being said in a group. Any time the trigger is mentioned, that message will immediately be deleted.
214
+ A good combo is sometimes to pair this up with warn filters!
215
+ **NOTE:** blacklists do not affect group admins.
216
+ × /blacklist: View the current blacklisted words.
217
+ **Admin only:**
218
+ × /addblacklist `<triggers>`: Add a trigger to the blacklist. Each line is considered one trigger, so using different lines will allow you to add multiple triggers.
219
+ × /unblacklist `<triggers>`: Remove triggers from the blacklist. Same newline logic applies here, so you can remove multiple triggers at once.
220
+ × /blaction `<action>`: This action will occur when user uses a blacklist word. Choose from - 'kick', 'ban', 'mute', 'warn'.
221
+ Default is 'none', which will delete the users message on typing a blacklist word.
222
+ **Owner Only**
223
+ × /rmallblacklist: Removes all the blacklists from the current chat.
224
+ **Note:** Can only add or remove one blacklist at a time!
225
+ **Example:**
226
+ `/addblacklist hello`: this adds the word 'hello' as blacklist in the chat."""
Powers/plugins/dev.py CHANGED
@@ -337,3 +337,5 @@ async def chat_broadcast(c: Gojo, m: Message):
337
 
338
 
339
  _DISABLE_CMDS_ = ["ping"]
 
 
 
337
 
338
 
339
  _DISABLE_CMDS_ = ["ping"]
340
+
341
+ __HELP__ = """To check the ping of the bot just type `/ping`"""
Powers/plugins/filters.py CHANGED
@@ -299,3 +299,29 @@ __PLUGIN__ = "filters"
299
  _DISABLE_CMDS_ = ["filters"]
300
 
301
  __alt_name__ = ["filters", "autoreply"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  _DISABLE_CMDS_ = ["filters"]
300
 
301
  __alt_name__ = ["filters", "autoreply"]
302
+
303
+ __HELP__ = """• /filters: List all active filters saved in the chat.
304
+
305
+ **Admin only:**
306
+ • /filter "`<keyword>`" `<reply message>`: Add a filter to this chat. The bot will now reply that message whenever 'keyword'
307
+ is mentioned. If you reply to a sticker with a keyword, the bot will reply with that sticker.
308
+
309
+ If you want your keyword to be a sentence, use quotes. eg: /filter "hey there" How are you doin?
310
+ **Example:**
311
+ `/filter "filtername" Reply Text`
312
+
313
+ Aliases for filters can be too set, just put '|' between the filternames you want.
314
+ **Example:**
315
+ `/filter "filtername1|filtername2" Reply Text`
316
+ Using the you can make a single filter work on 2 filternames without manually adding another one.
317
+
318
+ • /stop `<filter keyword>`: Stop that filter.
319
+ **Note:** For filters with aliases, if you stop one alias, the filter will stop working on other aliases too.
320
+ **For Example:** If you stop the "filtername1" from above example, the bot will not respond to "filtername2".
321
+
322
+ **Chat creator only:**
323
+ • /removeallfilters: Remove all chat filters at once.
324
+
325
+ **Note:**
326
+ Currently there is a limit of 50 filters and 120 aliases per chat.
327
+ All filter keywords are in lowercase."""
Powers/plugins/formatting.py CHANGED
@@ -134,3 +134,7 @@ __buttons__ = [
134
  ],
135
  [("Random Content", "formatting.random_content")],
136
  ]
 
 
 
 
 
134
  ],
135
  [("Random Content", "formatting.random_content")],
136
  ]
137
+
138
+ __HELP__ = """Formatting
139
+
140
+ Gojo supports a large number of formatting options to make your messages more expressive. Take a look by clicking the buttons below!"""
Powers/plugins/fun.py CHANGED
@@ -195,3 +195,13 @@ _DISABLE_CMDS_ = [
195
  "insult",
196
  "shrug",
197
  ]
 
 
 
 
 
 
 
 
 
 
 
195
  "insult",
196
  "shrug",
197
  ]
198
+
199
+ __HELP__ = """× /runs: reply a random string from an array of replies.
200
+ × /slap: slap a user, or get slapped if not a reply.
201
+ × /shrug : get shrug XD.
202
+ × /decide : Randomly answers yes/no/maybe
203
+ × /toss : Tosses A coin
204
+ × /bluetext : check urself :V
205
+ × /roll : Roll a dice.
206
+ × /react : Random Reaction
207
+ × /shout `<keyword>`: write anything you want to give loud shout."""
Powers/plugins/greetings.py CHANGED
@@ -477,3 +477,25 @@ async def goodbye(c: Gojo, m: Message):
477
 
478
  __PLUGIN__ = "greetings"
479
  __alt_name__ = ["welcome", "goodbye", "cleanservice"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
477
 
478
  __PLUGIN__ = "greetings"
479
  __alt_name__ = ["welcome", "goodbye", "cleanservice"]
480
+
481
+ __HELP__ = """Customize your group's welcome / goodbye messages that can be personalised in multiple ways.
482
+
483
+ Note:
484
+ a) Currently it supports only text!
485
+ b) Alita must be an admin to greet and goodbye users.
486
+
487
+ Admin Commands:
488
+ × /setwelcome <reply> : Sets a custom welcome message.
489
+ × /setgoodbye <reply> : Sets a custom goodbye message.
490
+ × /resetwelcome : Resets to bot default welcome message.
491
+ × /resetgoodbye : Resets to bot default goodbye message.
492
+ × /welcome <on/off> | noformat : enable/disable | Shows the current welcome message | settings.
493
+ × /goodbye <on/off> | noformat : enable/disable | Shows the current goodbye message | settings.
494
+ × /cleanwelcome <on/off> : Shows or sets the current clean welcome settings.
495
+ × /cleangoodbye <on/off> : Shows or sets the current clean goodbye settings.
496
+
497
+ ── **Cleaner** ──:
498
+ × /cleanservice <on/off> : Use it to clean all service messages automatically or to view current status.
499
+
500
+ ── **Format** ──
501
+ Check /markdownhelp for help related to formatting!"""
Powers/plugins/info.py CHANGED
@@ -1,5 +1,7 @@
1
  import os
2
 
 
 
3
  from pyrogram.types import Message
4
 
5
  from Powers import DEV_USERS, SUDO_USERS, WHITELIST_USERS, SUPPORT_STAFF, LOGGER
@@ -159,3 +161,6 @@ _DISABLE_CMDS_ = [
159
  "info",
160
  "chinfo",
161
  ]
 
 
 
 
1
  import os
2
 
3
+ from traceback import format_exc
4
+
5
  from pyrogram.types import Message
6
 
7
  from Powers import DEV_USERS, SUDO_USERS, WHITELIST_USERS, SUPPORT_STAFF, LOGGER
 
161
  "info",
162
  "chinfo",
163
  ]
164
+
165
+ __HELP__ = """/info - to get info about an user
166
+ /chinfo - to get info about a group or channel"""
Powers/plugins/locks.py CHANGED
@@ -326,3 +326,15 @@ async def prevent_approved(m: Message):
326
  __PLUGIN__ = "locks"
327
 
328
  __alt_name__ = ["grouplock", "lock", "grouplocks"]
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  __PLUGIN__ = "locks"
327
 
328
  __alt_name__ = ["grouplock", "lock", "grouplocks"]
329
+
330
+ __HELP__ = """ Use this to lock group permissions.
331
+ Allows you to lock and unlock permission types in the chat.
332
+
333
+ **Usage:**
334
+ × /lock `<type>`: Lock Chat permission.
335
+ × /unlock `<type>`: Unlock Chat permission.
336
+ × /locks: View Chat permission.
337
+ × /locktypes: Check available lock types!
338
+
339
+ **Example:**
340
+ `/lock media`: this locks all the media messages in the chat."""
Powers/plugins/muting.py CHANGED
@@ -598,3 +598,18 @@ __alt_name__ = [
598
  "tmute",
599
  "unmute",
600
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
  "tmute",
599
  "unmute",
600
  ]
601
+
602
+ __HELP__ = """Want someone to keep quite for a while in the group?
603
+ Mute plugin is here to help, mute or unmute any user easily!
604
+
605
+ **Admin only:**
606
+ × /mute: Mute the user replied to or mentioned.
607
+ × /smute: silences a user without notifying. Can also be used as a reply, muting the replied to user.
608
+ × /dmute: Mute a user by reply, and delete their message.
609
+ × /tmute <userhandle> x(m/h/d): mutes a user for x time. (via handle, or reply). m = minutes, h = hours, d = days.
610
+ × /stmute <userhandle> x(m/h/d): mutes a user for x time without notifying. (via handle, or reply). m = minutes, h = hours, d = days.
611
+ × /dtmute <userhandle> x(m/h/d): Mute the replied user, and delete the replied message. (via reply). m = minutes, h = hours, d = days.
612
+ × /unmute: Unmutes the user mentioned or replied to.
613
+
614
+ **Example:**
615
+ `/mute @username`; this mutes a user."""
Powers/plugins/notes.py CHANGED
@@ -424,3 +424,31 @@ __PLUGIN__ = "notes"
424
  _DISABLE_CMDS_ = ["notes"]
425
 
426
  __alt_name__ = ["groupnotes", "snips", "notes"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
  _DISABLE_CMDS_ = ["notes"]
425
 
426
  __alt_name__ = ["groupnotes", "snips", "notes"]
427
+
428
+ __HELP__ = """Save a note, get that, even you can delete that note.
429
+ This note only avaiable for your whole group!
430
+ Only admins can save and deletenotes, anyone can get them.
431
+
432
+ × /save `<notename>` <`note content or reply to message>`
433
+ Save a note, you can get or delete that later.
434
+
435
+ × /get `<note>` or #<note>
436
+ Get that note, if avaiable.
437
+
438
+ × /get `<note>` noformat or /get `<note>` raw
439
+ Get that note in raw format, so you can edit and update it.
440
+
441
+ × /clear `<note>`
442
+ Delete that note, if avaiable.
443
+
444
+ × /clearall
445
+ Clears all notes in the chat!
446
+ **NOTE:** Can only be used by owner of chat!
447
+
448
+ × /saved or /notes
449
+ Get all your notes, if too much notes, please use this in your saved message instead!
450
+
451
+ × /privatenotes `<on/yes/no/off>`: Whether to turn private rules on or off, prevents spam in chat when people use notes command.
452
+
453
+ ── **Note Format** ──
454
+ Check /markdownhelp for help related to formatting!"""
Powers/plugins/pin.py CHANGED
@@ -235,3 +235,14 @@ async def perma_pin(_, m: Message):
235
  __PLUGIN__ = "pins"
236
 
237
  __alt_name__ = ["pin", "unpin"]
 
 
 
 
 
 
 
 
 
 
 
 
235
  __PLUGIN__ = "pins"
236
 
237
  __alt_name__ = ["pin", "unpin"]
238
+
239
+ __HELP__ = """Here you find find all help related to groups pins and how to manage them via me.
240
+
241
+ **Admin Cmds:**
242
+ × /pin: Silently pins the message replied to - add `loud`, `notify` or `alert` to give notificaton to users.
243
+ × /unpin: Unpins the last pinned message.
244
+ × /pinned: Gives the current pinned message of the chat.
245
+ × /unpinall: Unpins all the pinned message in the current chat.
246
+ × /antichannelpin `<on/off/yes/no>`: Toggle antichannelpin status. All the messages from linked channel will be unpinned if enabled!
247
+ × /cleanlinked `<on/off/yes/no>`: Toggle cleanlinked status. All the messages from linked channel will be deleted if enabled!
248
+ × /permapin `<text>`: Pin a custom messages via bot. This message can contain markdown, and can be used in replies to the media include additional buttons and text."""
Powers/plugins/purge.py CHANGED
@@ -115,3 +115,8 @@ async def del_msg(c: Gojo, m: Message):
115
  __PLUGIN__ = "purges"
116
 
117
  __alt_name__ = ["purge", "del", "spurge"]
 
 
 
 
 
 
115
  __PLUGIN__ = "purges"
116
 
117
  __alt_name__ = ["purge", "del", "spurge"]
118
+
119
+ __HELP__ = """Want to delete messages in you group?
120
+ × /purge: Deletes messages upto replied message.
121
+ × /spurge: Deletes messages upto replied message without a success message.
122
+ × /del: Deletes a single message, used as a reply to message."""
Powers/plugins/report.py CHANGED
@@ -200,3 +200,12 @@ async def report_buttons(c: Gojo, q: CallbackQuery):
200
  __PLUGIN__ = "reporting"
201
 
202
  __alt_name__ = ["reports", "report"]
 
 
 
 
 
 
 
 
 
 
200
  __PLUGIN__ = "reporting"
201
 
202
  __alt_name__ = ["reports", "report"]
203
+
204
+ __HELP__ = """× /report `<reason>`: reply to a message to report it to admins.
205
+ - @admin: reply to a message to report it to admins.
206
+ **NOTE:** Neither of these will get triggered if used by admins.
207
+
208
+ **Admins Only:**
209
+ × /reports `<on/off/yes/no>`: change report setting, or view current status.
210
+ - If done in PM, toggles your status.
211
+ - If in group, toggles that groups's status."""
Powers/plugins/rules.py CHANGED
@@ -146,3 +146,12 @@ async def clearrules_callback(_, q: CallbackQuery):
146
  __PLUGIN__ = "rules"
147
 
148
  __alt_name__ = ["rule"]
 
 
 
 
 
 
 
 
 
 
146
  __PLUGIN__ = "rules"
147
 
148
  __alt_name__ = ["rule"]
149
+
150
+ __HELP__ = """Set rules for you chat so that members know what to do and what not to do in your group!
151
+
152
+ × /rules: get the rules for current chat.
153
+
154
+ **Admin only:**
155
+ × /setrules `<rules>`: Set the rules for this chat, also works as a reply to a message.
156
+ × /clearrules: Clear the rules for this chat.
157
+ × /privrules `<on/yes/no/off>`: Turns on/off the option to send the rules to PM of user or group."""
Powers/plugins/utils.py CHANGED
@@ -381,3 +381,17 @@ _DISABLE_CMDS_ = [
381
  "info",
382
  ]
383
  __alt_name__ = ["util", "misc", "tools"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  "info",
382
  ]
383
  __alt_name__ = ["util", "misc", "tools"]
384
+
385
+ __HELP__ = """Some utils provided by bot to make your tasks easy!
386
+
387
+ × /id: Get the current group id. If used by replying to a message, get that user's id.
388
+ × /info: Get information about a user.
389
+ × /gifid: Reply to a gif to me to tell you its file ID.
390
+ × /wiki: `<query>`: wiki your query.
391
+ × /tr `<language>`: Translates the text and then replies to you with the language you have specifed, works as a reply to message.
392
+ × /github `<username>`: Search for the user using github api!
393
+ × /lyrics `<song>`: Get the lyrics of the song you specify!
394
+ × /weebify `<text>` or `<reply to message>`: To weebify the text.
395
+
396
+ **Example:**
397
+ `/info @username`: this fetches the information about a user from the database."""
Powers/plugins/warns.py CHANGED
@@ -367,3 +367,21 @@ async def warnlimit(_, m: Message):
367
  __PLUGIN__ = "warnings"
368
 
369
  __alt_name__ = ["warn", "warning", "warns"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  __PLUGIN__ = "warnings"
368
 
369
  __alt_name__ = ["warn", "warning", "warns"]
370
+
371
+ __HELP__ = """Keep your members in check with warnings; stop them getting out of control!
372
+
373
+ If you're looking for automated warnings, go read about the blacklist module.
374
+
375
+ Admin commands:
376
+ - /warn `<reason>`: Warn a user.
377
+ - /dwarn `<reason>`: Warn a user by reply, and delete their message.
378
+ - /swarn `<reason>`: Silently warn a user, and delete your message.
379
+ - /warns: See a user's warnings.
380
+ - /rmwarn: Remove a user's latest warning.
381
+ - /resetwarn: Reset all of a user's warnings to 0.
382
+ - /warnings: Get the chat's warning settings.
383
+ - /warnmode `<ban/kick/mute>`: Set the chat's warn mode.
384
+ - /warnlimit `<number>`: Set the number of warnings before users are punished.
385
+
386
+ Examples:
387
+ `/warn @user`: this warns a user in the chat."""
Powers/utils/start_utils.py CHANGED
@@ -237,7 +237,7 @@ async def get_help_msg(m: Message or CallbackQuery, help_option: str):
237
  if help_option in HELP_COMMANDS[i]["alt_cmds"]
238
  ) + [[("« " + "Back", "commands")]]
239
  help_msg = (
240
- f"**{(help_option_name['help_msg']).replace('.help', '.main')}:**\n\n"
241
  + help_option_value
242
  )
243
  LOGGER.info(
 
237
  if help_option in HELP_COMMANDS[i]["alt_cmds"]
238
  ) + [[("« " + "Back", "commands")]]
239
  help_msg = (
240
+ f"**{(help_option_name['help_msg'])}:**\n\n"
241
  + help_option_value
242
  )
243
  LOGGER.info(