Spaces:
Sleeping
Sleeping
iamgojoof6eyes
commited on
Commit
·
709df35
1
Parent(s):
15e685f
Minor updates
Browse files- Powers/plugins/admin.py +2 -2
- Powers/plugins/approve.py +2 -3
- Powers/plugins/bans.py +2 -3
- Powers/plugins/blacklist.py +2 -3
- Powers/plugins/dev.py +0 -1
- Powers/plugins/filters.py +3 -1
- Powers/plugins/formatting.py +2 -1
- Powers/plugins/fun.py +5 -2
- Powers/plugins/greetings.py +4 -1
- Powers/plugins/info.py +7 -3
- Powers/plugins/locks.py +4 -1
- Powers/plugins/muting.py +4 -1
- Powers/plugins/notes.py +4 -1
- Powers/plugins/pin.py +5 -2
- Powers/plugins/purge.py +3 -1
- Powers/plugins/report.py +4 -1
- Powers/plugins/rules.py +4 -1
- Powers/plugins/utils.py +4 -1
- Powers/plugins/warns.py +4 -1
- README.md +3 -2
- poetry.lock +0 -11
- requirements.txt +0 -1
Powers/plugins/admin.py
CHANGED
@@ -552,8 +552,8 @@ __alt_name__ = [
|
|
552 |
"zombies",
|
553 |
]
|
554 |
|
555 |
-
__HELP__ = """
|
556 |
-
|
557 |
**User Commands:**
|
558 |
* /adminlist: List all the admins in the Group.
|
559 |
**Admin only:**
|
|
|
552 |
"zombies",
|
553 |
]
|
554 |
|
555 |
+
__HELP__ = """
|
556 |
+
`Admin`
|
557 |
**User Commands:**
|
558 |
* /adminlist: List all the admins in the Group.
|
559 |
**Admin only:**
|
Powers/plugins/approve.py
CHANGED
@@ -234,9 +234,8 @@ _DISABLE_CMDS_ = ["approval"]
|
|
234 |
__alt_name__ = ["approved"]
|
235 |
|
236 |
|
237 |
-
__HELP__ = """
|
238 |
-
|
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.
|
|
|
234 |
__alt_name__ = ["approved"]
|
235 |
|
236 |
|
237 |
+
__HELP__ = """
|
238 |
+
`Apporve`
|
|
|
239 |
**Admin commands:**
|
240 |
* /approval: Check a user's approval status in this chat.
|
241 |
* /approve: Approve of a user. Locks, blacklists, and antiflood won't apply to them anymore.
|
Powers/plugins/bans.py
CHANGED
@@ -880,9 +880,8 @@ __alt_name__ = [
|
|
880 |
"tban",
|
881 |
]
|
882 |
|
883 |
-
__HELP__ = """
|
884 |
-
|
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.
|
|
|
880 |
"tban",
|
881 |
]
|
882 |
|
883 |
+
__HELP__ = """
|
884 |
+
`Bans`
|
|
|
885 |
**Admin only:**
|
886 |
* /kick: Kick the user replied or tagged.
|
887 |
* /skick: Kick the user replied or tagged and delete your messsage.
|
Powers/plugins/blacklist.py
CHANGED
@@ -209,9 +209,8 @@ __PLUGIN__ = "blacklist"
|
|
209 |
|
210 |
__alt_name__ = ["blacklists", "blaction"]
|
211 |
|
212 |
-
__HELP__ = """
|
213 |
-
|
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:**
|
|
|
209 |
|
210 |
__alt_name__ = ["blacklists", "blaction"]
|
211 |
|
212 |
+
__HELP__ = """
|
213 |
+
`Blacklist`
|
|
|
214 |
**NOTE:** blacklists do not affect group admins.
|
215 |
* /blacklist: View the current blacklisted words.
|
216 |
**Admin only:**
|
Powers/plugins/dev.py
CHANGED
@@ -22,7 +22,6 @@ from Powers.database.chats_db import Chats
|
|
22 |
from Powers.utils.clean_file import remove_markdown_and_html
|
23 |
from Powers.utils.custom_filters import command
|
24 |
from Powers.utils.http_helper import *
|
25 |
-
from Powers.utils.kbhelpers import ikb
|
26 |
from Powers.utils.parser import mention_markdown
|
27 |
from Powers.vars import Config
|
28 |
|
|
|
22 |
from Powers.utils.clean_file import remove_markdown_and_html
|
23 |
from Powers.utils.custom_filters import command
|
24 |
from Powers.utils.http_helper import *
|
|
|
25 |
from Powers.utils.parser import mention_markdown
|
26 |
from Powers.vars import Config
|
27 |
|
Powers/plugins/filters.py
CHANGED
@@ -300,7 +300,9 @@ _DISABLE_CMDS_ = ["filters"]
|
|
300 |
|
301 |
__alt_name__ = ["filters", "autoreply"]
|
302 |
|
303 |
-
__HELP__ = """
|
|
|
|
|
304 |
|
305 |
**Admin only:**
|
306 |
• /filter "`<keyword>`" `<reply message>`: Add a filter to this chat. The bot will now reply that message whenever 'keyword'
|
|
|
300 |
|
301 |
__alt_name__ = ["filters", "autoreply"]
|
302 |
|
303 |
+
__HELP__ = """
|
304 |
+
`Filters`
|
305 |
+
• /filters: List all active filters saved in the chat.
|
306 |
|
307 |
**Admin only:**
|
308 |
• /filter "`<keyword>`" `<reply message>`: Add a filter to this chat. The bot will now reply that message whenever 'keyword'
|
Powers/plugins/formatting.py
CHANGED
@@ -135,6 +135,7 @@ __buttons__ = [
|
|
135 |
[("Random Content", "formatting.random_content")],
|
136 |
]
|
137 |
|
138 |
-
__HELP__ = """
|
|
|
139 |
|
140 |
Gojo supports a large number of formatting options to make your messages more expressive. Take a look by clicking the buttons below!"""
|
|
|
135 |
[("Random Content", "formatting.random_content")],
|
136 |
]
|
137 |
|
138 |
+
__HELP__ = """
|
139 |
+
`Formatting`
|
140 |
|
141 |
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
@@ -10,7 +10,7 @@ from Powers.bot_class import Gojo
|
|
10 |
from Powers.utils import fun_strings
|
11 |
from Powers.utils.custom_filters import command
|
12 |
from Powers.utils.extract_user import extract_user
|
13 |
-
from Powers.utils.fun_strings import YESWNO as YES
|
14 |
|
15 |
|
16 |
@Gojo.on_message(command("shout"))
|
@@ -209,7 +209,10 @@ _DISABLE_CMDS_ = [
|
|
209 |
"shrug",
|
210 |
]
|
211 |
|
212 |
-
__HELP__ = """
|
|
|
|
|
|
|
213 |
* /slap: slap a user, or get slapped if not a reply.
|
214 |
* /insult: to insult a user, or get insulted if not a reply
|
215 |
* /shrug : get shrug XD.
|
|
|
10 |
from Powers.utils import fun_strings
|
11 |
from Powers.utils.custom_filters import command
|
12 |
from Powers.utils.extract_user import extract_user
|
13 |
+
from Powers.utils.fun_strings import YESWNO as YES, NOWYES as NO
|
14 |
|
15 |
|
16 |
@Gojo.on_message(command("shout"))
|
|
|
209 |
"shrug",
|
210 |
]
|
211 |
|
212 |
+
__HELP__ = """
|
213 |
+
`Fun`
|
214 |
+
|
215 |
+
* /runs: reply a random string from an array of replies.
|
216 |
* /slap: slap a user, or get slapped if not a reply.
|
217 |
* /insult: to insult a user, or get insulted if not a reply
|
218 |
* /shrug : get shrug XD.
|
Powers/plugins/greetings.py
CHANGED
@@ -478,7 +478,10 @@ async def goodbye(c: Gojo, m: Message):
|
|
478 |
__PLUGIN__ = "greetings"
|
479 |
__alt_name__ = ["welcome", "goodbye", "cleanservice"]
|
480 |
|
481 |
-
__HELP__ = """
|
|
|
|
|
|
|
482 |
|
483 |
Note:
|
484 |
a) Currently it supports only text!
|
|
|
478 |
__PLUGIN__ = "greetings"
|
479 |
__alt_name__ = ["welcome", "goodbye", "cleanservice"]
|
480 |
|
481 |
+
__HELP__ = """
|
482 |
+
`Greetings`
|
483 |
+
|
484 |
+
Customize your group's welcome / goodbye messages that can be personalised in multiple ways.
|
485 |
|
486 |
Note:
|
487 |
a) Currently it supports only text!
|
Powers/plugins/info.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import os
|
2 |
from traceback import format_exc
|
3 |
from datetime import datetime
|
|
|
4 |
|
5 |
from pyrogram import filters
|
6 |
from pyrogram.types import Message
|
@@ -36,7 +37,7 @@ def change(
|
|
36 |
return text
|
37 |
|
38 |
|
39 |
-
async def user_info(user
|
40 |
if not already:
|
41 |
user = await Gojo.get_users(user)
|
42 |
if not user.first_name:
|
@@ -197,5 +198,8 @@ __alt_name__ = [
|
|
197 |
"chinfo",
|
198 |
]
|
199 |
|
200 |
-
__HELP__ = """
|
201 |
-
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
from traceback import format_exc
|
3 |
from datetime import datetime
|
4 |
+
from psutil import users
|
5 |
|
6 |
from pyrogram import filters
|
7 |
from pyrogram.types import Message
|
|
|
37 |
return text
|
38 |
|
39 |
|
40 |
+
async def user_info(user, already=False):
|
41 |
if not already:
|
42 |
user = await Gojo.get_users(user)
|
43 |
if not user.first_name:
|
|
|
198 |
"chinfo",
|
199 |
]
|
200 |
|
201 |
+
__HELP__ = """
|
202 |
+
`Information`
|
203 |
+
|
204 |
+
*/info - To get info about the user
|
205 |
+
*/chinfo - To get info about the chat"""
|
Powers/plugins/locks.py
CHANGED
@@ -327,7 +327,10 @@ __PLUGIN__ = "locks"
|
|
327 |
|
328 |
__alt_name__ = ["grouplock", "lock", "grouplocks"]
|
329 |
|
330 |
-
__HELP__ = """
|
|
|
|
|
|
|
331 |
Allows you to lock and unlock permission types in the chat.
|
332 |
|
333 |
**Usage:**
|
|
|
327 |
|
328 |
__alt_name__ = ["grouplock", "lock", "grouplocks"]
|
329 |
|
330 |
+
__HELP__ = """
|
331 |
+
`Locks`
|
332 |
+
|
333 |
+
Use this to lock group permissions.
|
334 |
Allows you to lock and unlock permission types in the chat.
|
335 |
|
336 |
**Usage:**
|
Powers/plugins/muting.py
CHANGED
@@ -599,7 +599,10 @@ __alt_name__ = [
|
|
599 |
"unmute",
|
600 |
]
|
601 |
|
602 |
-
__HELP__ = """
|
|
|
|
|
|
|
603 |
Mute plugin is here to help, mute or unmute any user easily!
|
604 |
|
605 |
**Admin only:**
|
|
|
599 |
"unmute",
|
600 |
]
|
601 |
|
602 |
+
__HELP__ = """
|
603 |
+
`Muting`
|
604 |
+
|
605 |
+
Want someone to keep quite for a while in the group?
|
606 |
Mute plugin is here to help, mute or unmute any user easily!
|
607 |
|
608 |
**Admin only:**
|
Powers/plugins/notes.py
CHANGED
@@ -425,7 +425,10 @@ _DISABLE_CMDS_ = ["notes"]
|
|
425 |
|
426 |
__alt_name__ = ["groupnotes", "snips", "notes"]
|
427 |
|
428 |
-
__HELP__ = """
|
|
|
|
|
|
|
429 |
This note only avaiable for your whole group!
|
430 |
Only admins can save and deletenotes, anyone can get them.
|
431 |
|
|
|
425 |
|
426 |
__alt_name__ = ["groupnotes", "snips", "notes"]
|
427 |
|
428 |
+
__HELP__ = """
|
429 |
+
`Notes`
|
430 |
+
|
431 |
+
Save a note, get that, even you can delete that note.
|
432 |
This note only avaiable for your whole group!
|
433 |
Only admins can save and deletenotes, anyone can get them.
|
434 |
|
Powers/plugins/pin.py
CHANGED
@@ -94,7 +94,7 @@ async def unpin_message(c: Gojo, m: Message):
|
|
94 |
async def unpinall_message(_, m: Message):
|
95 |
await m.reply_text(
|
96 |
"Do you really want to unpin all messages in this chat?",
|
97 |
-
reply_markup=ikb([[("Yes", "
|
98 |
)
|
99 |
return
|
100 |
|
@@ -236,7 +236,10 @@ __PLUGIN__ = "pins"
|
|
236 |
|
237 |
__alt_name__ = ["pin", "unpin"]
|
238 |
|
239 |
-
__HELP__ = """
|
|
|
|
|
|
|
240 |
|
241 |
**Admin Cmds:**
|
242 |
* /pin: Silently pins the message replied to - add `loud`, `notify` or `alert` to give notificaton to users.
|
|
|
94 |
async def unpinall_message(_, m: Message):
|
95 |
await m.reply_text(
|
96 |
"Do you really want to unpin all messages in this chat?",
|
97 |
+
reply_markup=ikb([[("Yes", "unpin all in this chat"), ("No", "close_admin")]]),
|
98 |
)
|
99 |
return
|
100 |
|
|
|
236 |
|
237 |
__alt_name__ = ["pin", "unpin"]
|
238 |
|
239 |
+
__HELP__ = """
|
240 |
+
`Pin`
|
241 |
+
|
242 |
+
Here you find find all help related to groups pins and how to manage them via me.
|
243 |
|
244 |
**Admin Cmds:**
|
245 |
* /pin: Silently pins the message replied to - add `loud`, `notify` or `alert` to give notificaton to users.
|
Powers/plugins/purge.py
CHANGED
@@ -116,7 +116,9 @@ __PLUGIN__ = "purges"
|
|
116 |
|
117 |
__alt_name__ = ["purge", "del", "spurge"]
|
118 |
|
119 |
-
__HELP__ = """
|
|
|
|
|
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."""
|
|
|
116 |
|
117 |
__alt_name__ = ["purge", "del", "spurge"]
|
118 |
|
119 |
+
__HELP__ = """
|
120 |
+
`Purge`
|
121 |
+
|
122 |
* /purge: Deletes messages upto replied message.
|
123 |
* /spurge: Deletes messages upto replied message without a success message.
|
124 |
* /del: Deletes a single message, used as a reply to message."""
|
Powers/plugins/report.py
CHANGED
@@ -201,7 +201,10 @@ __PLUGIN__ = "reporting"
|
|
201 |
|
202 |
__alt_name__ = ["reports", "report"]
|
203 |
|
204 |
-
__HELP__ = """
|
|
|
|
|
|
|
205 |
- @admin: reply to a message to report it to admins.
|
206 |
**NOTE:** Neither of these will get triggered if used by admins.
|
207 |
|
|
|
201 |
|
202 |
__alt_name__ = ["reports", "report"]
|
203 |
|
204 |
+
__HELP__ = """
|
205 |
+
`Report`
|
206 |
+
|
207 |
+
* /report `<reason>`: reply to a message to report it to admins.
|
208 |
- @admin: reply to a message to report it to admins.
|
209 |
**NOTE:** Neither of these will get triggered if used by admins.
|
210 |
|
Powers/plugins/rules.py
CHANGED
@@ -147,7 +147,10 @@ __PLUGIN__ = "rules"
|
|
147 |
|
148 |
__alt_name__ = ["rule"]
|
149 |
|
150 |
-
__HELP__ = """
|
|
|
|
|
|
|
151 |
|
152 |
* /rules: get the rules for current chat.
|
153 |
|
|
|
147 |
|
148 |
__alt_name__ = ["rule"]
|
149 |
|
150 |
+
__HELP__ = """
|
151 |
+
`Rules`
|
152 |
+
|
153 |
+
Set rules for you chat so that members know what to do and what not to do in your group!
|
154 |
|
155 |
* /rules: get the rules for current chat.
|
156 |
|
Powers/plugins/utils.py
CHANGED
@@ -335,7 +335,10 @@ _DISABLE_CMDS_ = [
|
|
335 |
]
|
336 |
__alt_name__ = ["util", "misc", "tools"]
|
337 |
|
338 |
-
__HELP__ = """
|
|
|
|
|
|
|
339 |
|
340 |
* /id: Get the current group id. If used by replying to a message, get that user's id.
|
341 |
* /info: Get information about a user.
|
|
|
335 |
]
|
336 |
__alt_name__ = ["util", "misc", "tools"]
|
337 |
|
338 |
+
__HELP__ = """
|
339 |
+
`Utils`
|
340 |
+
|
341 |
+
Some utils provided by bot to make your tasks easy!
|
342 |
|
343 |
* /id: Get the current group id. If used by replying to a message, get that user's id.
|
344 |
* /info: Get information about a user.
|
Powers/plugins/warns.py
CHANGED
@@ -368,7 +368,10 @@ __PLUGIN__ = "warnings"
|
|
368 |
|
369 |
__alt_name__ = ["warn", "warning", "warns"]
|
370 |
|
371 |
-
__HELP__ = """
|
|
|
|
|
|
|
372 |
|
373 |
If you're looking for automated warnings, go read about the blacklist module.
|
374 |
|
|
|
368 |
|
369 |
__alt_name__ = ["warn", "warning", "warns"]
|
370 |
|
371 |
+
__HELP__ = """
|
372 |
+
`Warns`
|
373 |
+
|
374 |
+
Keep your members in check with warnings; stop them getting out of control!
|
375 |
|
376 |
If you're looking for automated warnings, go read about the blacklist module.
|
377 |
|
README.md
CHANGED
@@ -170,8 +170,9 @@ To add your very own plugin just use the format given below and go through the [
|
|
170 |
LOGGER.error(format_exc())'''
|
171 |
|
172 |
__PLUGIN__ = <name of plugin> # Pass the name of your plugin as string
|
173 |
-
_DISABLE_CMDS_ = [<command as string>] #
|
174 |
-
|
|
|
175 |
|
176 |
__HELP__ = <string> # To tell about you plugin and commands you must use it
|
177 |
|
|
|
170 |
LOGGER.error(format_exc())'''
|
171 |
|
172 |
__PLUGIN__ = <name of plugin> # Pass the name of your plugin as string
|
173 |
+
_DISABLE_CMDS_ = [<command as string>] # Enter the commands if you want that they can be disabled if needed.
|
174 |
+
|
175 |
+
__alt_name__ = [<command as string>] # Alternative name of the plugin
|
176 |
|
177 |
__HELP__ = <string> # To tell about you plugin and commands you must use it
|
178 |
|
poetry.lock
CHANGED
@@ -441,14 +441,6 @@ category = "dev"
|
|
441 |
optional = false
|
442 |
python-versions = "*"
|
443 |
|
444 |
-
[[package]]
|
445 |
-
name = "pykeyboard"
|
446 |
-
version = "0.1.5"
|
447 |
-
description = "Inline keyboard for python"
|
448 |
-
category = "main"
|
449 |
-
optional = false
|
450 |
-
python-version = "3.6"
|
451 |
-
|
452 |
[[package]]
|
453 |
name = "pylint"
|
454 |
version = "2.13.4"
|
@@ -1061,9 +1053,6 @@ pyclean = [
|
|
1061 |
{file = "pyclean-2.2.0-py3-none-any.whl", hash = "sha256:5f99597b76249b71b86d8e9aff1e69dfdc0b1976d14ce366e07b28dc6f7a8ee6"},
|
1062 |
{file = "pyclean-2.2.0.tar.gz", hash = "sha256:48f1801804fa2f04f2c64348da8bd61797fc9722e1120c470d5cc67a205843c7"},
|
1063 |
]
|
1064 |
-
pykeyboard = [
|
1065 |
-
{file = "pykeyboard-0.1.5.tar.gz", hash = "sha256:b77be4341129ae73e363d46fe1f3243132fc04932f4ad2f7f8234d0971de4de4"}
|
1066 |
-
]
|
1067 |
pylint = [
|
1068 |
{file = "pylint-2.13.4-py3-none-any.whl", hash = "sha256:8672cf7441b81410f5de7defdf56e2d559c956fd0579652f2e0a0a35bea2d546"},
|
1069 |
{file = "pylint-2.13.4.tar.gz", hash = "sha256:7cc6d0c4f61dff440f9ed8b657f4ecd615dcfe35345953eb7b1dc74afe901d7a"},
|
|
|
441 |
optional = false
|
442 |
python-versions = "*"
|
443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
[[package]]
|
445 |
name = "pylint"
|
446 |
version = "2.13.4"
|
|
|
1053 |
{file = "pyclean-2.2.0-py3-none-any.whl", hash = "sha256:5f99597b76249b71b86d8e9aff1e69dfdc0b1976d14ce366e07b28dc6f7a8ee6"},
|
1054 |
{file = "pyclean-2.2.0.tar.gz", hash = "sha256:48f1801804fa2f04f2c64348da8bd61797fc9722e1120c470d5cc67a205843c7"},
|
1055 |
]
|
|
|
|
|
|
|
1056 |
pylint = [
|
1057 |
{file = "pylint-2.13.4-py3-none-any.whl", hash = "sha256:8672cf7441b81410f5de7defdf56e2d559c956fd0579652f2e0a0a35bea2d546"},
|
1058 |
{file = "pylint-2.13.4.tar.gz", hash = "sha256:7cc6d0c4f61dff440f9ed8b657f4ecd615dcfe35345953eb7b1dc74afe901d7a"},
|
requirements.txt
CHANGED
@@ -19,7 +19,6 @@ idna==3.3; python_version >= "3.6" and (python_version >= "3.5" and python_full_
|
|
19 |
lxml==4.8.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
20 |
prettyconf==2.2.1
|
21 |
pyaes==1.6.1; python_version >= "3.6" and python_version < "4.0"
|
22 |
-
pykeyboard==0.1.5; python_full_version >="3.6"
|
23 |
pymongo==3.12.3
|
24 |
pyrogram==2.0.19; python_version >= "3.7"
|
25 |
pysocks==1.7.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0"
|
|
|
19 |
lxml==4.8.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
20 |
prettyconf==2.2.1
|
21 |
pyaes==1.6.1; python_version >= "3.6" and python_version < "4.0"
|
|
|
22 |
pymongo==3.12.3
|
23 |
pyrogram==2.0.19; python_version >= "3.7"
|
24 |
pysocks==1.7.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0"
|