Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,303 +1,42 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
<h1 align="center"><img src="./extras/gojo_satoru__psd__by_at_yomiko_deyaec4-pre.jpg" /></h1>
|
9 |
|
|
|
10 |
|
|
|
|
|
|
|
|
|
11 |
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
|
14 |
|
15 |
-
|
16 |
-

|
17 |
|
18 |
-
!
|
19 |
-

|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-

|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
**A python and [pyrogram](https://github.com/Gojo-Bots/pyrogram) based group management bot for telegram.
|
30 |
-
If you like the bot make sure to give a ⭐ __star__ ⭐ to this respository and feel free to updating and sending pull requests**
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
---------
|
35 |
-
|
36 |
-
## Inspiration ✨
|
37 |
-
Not a particular inspiration, inspired by many bots
|
38 |
-
|
39 |
-
Mainly:
|
40 |
-
|
41 |
-
* [Alita_Robot](https://github.com/divideprojects/Alita_Robot)
|
42 |
-
* [WilliamButcherBot](https://github.com/TheHamkerCat/WilliamButcherBot)
|
43 |
-
|
44 |
-
---------
|
45 |
-
|
46 |
-
## About
|
47 |
-
|
48 |
-
<h1 align="center"><img src="./extras/original.gif" /></h1>
|
49 |
-
|
50 |
-
|
51 |
-
The Gojo Satoru is a powerful Group Management bot with awesome plugins and features.
|
52 |
-
|
53 |
-
**If you counter any problem or face any bugs for help join 🌟 [ɢօʝօ ɮօȶֆ](https://telegram.dog/gojo_bots_network) 🌟 and then join the gc and ask your problem.**
|
54 |
-
|
55 |
-
## Features
|
56 |
-
|
57 |
-
* Modern
|
58 |
-
* Fast
|
59 |
-
* Fully asynchronous
|
60 |
-
* Fully open-source
|
61 |
-
* Frequently updated
|
62 |
-
|
63 |
-
***Can be found on Telegram as __[@GojoSuperbot](https://telegram.dog/GojoSuperbot)__***
|
64 |
-
|
65 |
-
* Feel free to give ideas for next update. Drop your ideas [here](https://github.com/Gojo-Bots/Gojo_Satoru/discussions/new?category=ideas)
|
66 |
-
|
67 |
-
-------
|
68 |
-
|
69 |
-
## License
|
70 |
-
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
|
71 |
-
<br>Licensed Under <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU General Public License v3</a>
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
---------
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
# DEPLOYMENT 🚀
|
80 |
-
## Deploy To Heroku
|
81 |
-
* **Make Sure you have Heroku account**
|
82 |
-
|
83 |
-
* If you don't have heroku account what are you waiting for click [here](https://id.heroku.com/login) to make one or just deploy on other platform gudie is given below
|
84 |
-
|
85 |
-
* Just click on the button it will redirect you to Heroku website and deploy your bot there....enjoy 😉
|
86 |
-
|
87 |
-
[](https://heroku.com/deploy?template=https://github.com/Gojo-Bots/Gojo_Satoru.git)
|
88 |
-
|
89 |
-
-------
|
90 |
-
|
91 |
-
## Deploy To Railway
|
92 |
-
[](https://railway.app)
|
93 |
-
### How To Deploy On Railway
|
94 |
-
* **Make Sure You have an github account which is minimum 30 days old.**
|
95 |
-
* Fork the repo by clicking [here](https://github.com/Gojo-Bots/Gojo_Satoru/fork)
|
96 |
-
* Click on [deploy](https://railway.app) button
|
97 |
-
* Login in railway using github account
|
98 |
-
* Now search the repo in the search bar given like iamgojoof6eyes/Gojo_Satoru ***replace iamgojoof6eyes with your github username.***
|
99 |
-
* Now add the values and keys by creating values and keys ***Make sure to add keys __as per given below__ I'll advide you to just copy and paste it***
|
100 |
-
* Then wait for 10-15 minutes.
|
101 |
-
* Vars are [given below](#Variables)
|
102 |
-
* ***The bot can be used by provideing mandotry variables only..***
|
103 |
-
|
104 |
-
--------
|
105 |
-
|
106 |
-
## Deploy To Okteto
|
107 |
-
[](https://cloud.okteto.com/deploy?repository=https://github.com/Gojo-Bots/Gojo_Satoru)
|
108 |
-
|
109 |
-
### How To Deploy On Okteto
|
110 |
-
* **Make sure you have an github account.**
|
111 |
-
* [Fork](https://github.com/Gojo-Bots/Gojo_Satoru/fork) the repo and give a star to repo
|
112 |
-
* Click on [deploy](https://cloud.okteto.com/deploy?repository=https://github.com/Gojo-Bots/Gojo_Satoru) button provided above...
|
113 |
-
* Login using github.
|
114 |
-
* Fill the values
|
115 |
-
* Then wait for 10-15 minutes.
|
116 |
-
* Vars are [given below](#Variables)
|
117 |
-
* ***If you want to add more data of yours just go to the variable section and add the key and values to it then hit on `relaunch`***
|
118 |
-
|
119 |
-
***In case the button doesn't work just fork the repo give it a star open okteto login using github give okteto access to your github account repo search for your bot repo add the key and values provided [below](#Variables) and wait for few minutes***
|
120 |
-
|
121 |
-
--------
|
122 |
-
|
123 |
-
## Deploy locally
|
124 |
-
### Using git
|
125 |
-
|
126 |
-
* Install Python v3.7 or later from Python's Website
|
127 |
-
* Install virtualenv using `python3 -m pip -U install virtualenv`.
|
128 |
-
* Fork or Clone the project using `git clone https://github.com/Gojo-Bots/Gojo_Satoru.git`
|
129 |
-
* Create Virtualenv using: `virtualenv venv`
|
130 |
-
* Install the requirements using `python3 -m pip install -r requirements.txt`
|
131 |
-
* Fill in all the variables in the Development class, not the Config class. Sudo, Dev, Whitelist users are optional!!
|
132 |
-
* If you want, you can remove all the things
|
133 |
-
* Change to virtualenv shell by using: `. venv/bin/activate (Linux) venv\Scripts\activate (Windows)`
|
134 |
-
* Run the bot using `python3 -m Powers`
|
135 |
-
|
136 |
-
### Traditional method:
|
137 |
-
|
138 |
-
* Update apt by using `sudo apt update && sudo apt upgrade -y`
|
139 |
-
* Now install required packages by `sudo apt install --no-install-recommends -y python3-lxml python3-psycopg2 libpq-dev libcurl4-openssl-dev libxml2-dev libxslt1-dev python3-pip python3-sqlalchemy openssl wget curl git libffi-dev libjpeg-dev libwebp-dev python3 python3-dev pv tree mediainfo nano nodejs libreadline-dev libyaml-dev gcc zlib1g ffmpeg libssl-dev libgconf-2-4 libxi6 unzip libopus0 libopus-dev python3-virtualenv tmux libmagickwand-dev`
|
140 |
-
* Clone the GitHub repo by `https://github.com/Gojo-Bots/Gojo_Satoru`
|
141 |
-
* Now make it the current directory by `cd Gojo_Satoru`
|
142 |
-
* Edit the vars file by `nano Powers/vars.py`
|
143 |
-
* Fill in all the variables in the Development class, not the Config class. Sudo, Dev, and Whitelist users are optional!!
|
144 |
-
* Create and activate a new virtualenv by `virtualenv venv source venv/bin/activate`
|
145 |
-
* Install requirements to run the bot by `pip3 install -r requirements.txt`
|
146 |
-
* After requirements are installed, start the bot by `python3 -m Powers`
|
147 |
-
* Exit the window `CTRL + B` then `D`
|
148 |
-
|
149 |
-
<!---### Using docker
|
150 |
-
|
151 |
-
* Clone the repo and enter into it
|
152 |
-
* Install [Docker](https://www.docker.com/)
|
153 |
-
* Fill in the `sample.env` file and rename it to `main.env`.
|
154 |
-
* Now follow the steps:
|
155 |
-
To build the docker image **(The dot '.' at last is necessary!)**:
|
156 |
-
```
|
157 |
-
docker build -t gojo_gojo_satoru:latest .
|
158 |
-
```
|
159 |
-
To run copy and paste the following command
|
160 |
-
```
|
161 |
-
docker run --env-file main.env gojo_gojo_satoru
|
162 |
-
```
|
163 |
-
If all works well, the bot should send a message to the MESSAGE_DUMP Group!--->
|
164 |
-
|
165 |
-
## Variables
|
166 |
-
<details><summary><h3>List of all mandatory variables</h3></summary>
|
167 |
-
|
168 |
-
`BOT_TOKEN` You can get your bot token at [@BotFather](https://t.me/BotFather)
|
169 |
-
|
170 |
-
`API_ID` You can get your api id [here](my.telegram.org)
|
171 |
-
|
172 |
-
`API_HASH` You can get your api hash [here](my.telegram.org)
|
173 |
-
|
174 |
-
`DB_URI` Your [MongoDB](https://www.mongodb.com/) connection string.
|
175 |
-
|
176 |
-
`MESSAGE_DUMP`: Event logs channel where the bot will send updates. Note that it should start with `-100`. If you don't give it or pass 0 in it your owner id will be the message dump for the bot.
|
177 |
-
</details>
|
178 |
-
|
179 |
-
|
180 |
-
<details><summary><h3>List of all variables</h3></summary>
|
181 |
-
|
182 |
-
`BOT_TOKEN` You can get your bot token at [@BotFather](https://telegram.dog/BotFather)
|
183 |
-
|
184 |
-
`API_ID` You can get your api id [here](my.telegram.org)
|
185 |
-
|
186 |
-
`API_HASH` You can get your api hash [here](my.telegram.org)
|
187 |
-
|
188 |
-
`PREFIX_HANDLER` Your bot handler which will activate commands
|
189 |
-
|
190 |
-
`DB_URI` Your [MongoDB](https://www.mongodb.com/) connection string.
|
191 |
-
|
192 |
-
`DB_NAME` Your [MongoDB](https://www.mongodb.com/) database name.
|
193 |
-
|
194 |
-
`OWNER_ID` Your user ID as an integer.
|
195 |
-
|
196 |
-
`GENIUS_API` Your Lyrics [Genius Api Token](https://docs.genius.com/#/getting-started-h1). To fetch lyrics of songs.
|
197 |
-
|
198 |
-
`BDB_URI` Your mongodb uri is different from the previous one to store more info.
|
199 |
-
|
200 |
-
`TIME_ZONE` Your time zone.
|
201 |
-
|
202 |
-
`RMBG_API` Your [removebackground api](https://www.remove.bg/api#remove-background) to remove the background/
|
203 |
-
|
204 |
-
`SUPPORT_GROUP`: Your Telegram support group chat username that users can contact in case of a problem.
|
205 |
-
|
206 |
-
`PREFIX_HANDLER`: Something like '/' to execute commands.
|
207 |
-
|
208 |
-
`SUPPORT_CHANNEL`: Your Telegram support channel username where users can see bot updates.
|
209 |
-
|
210 |
-
`DEV_USERS`: ID of users who are Devs of your bot. Use space to separate values.
|
211 |
-
|
212 |
-
`SUDO_USERS`: A space-separated list of user IDs you want to assign as sudo users.
|
213 |
-
|
214 |
-
`WHITELIST_USERS`: A space-separated list of user IDs whitelisted, cannot be restricted.
|
215 |
-
|
216 |
-
`CHROME_BIN`: Location of your chrome bin.
|
217 |
-
|
218 |
-
`CHROME_DRIVER`: Location of your chrome driver.
|
219 |
-
|
220 |
-
⚠️ **Note:** In case you are passing more than one value separate them using whitespace (space) for example If I want to pass more than one PREFIX_HANDLER
|
221 |
-
I'll pass it like `'/' '.' '!'` this.
|
222 |
-
|
223 |
-
YOU CAN ALSO HAVE A LOOK AT [VARS FILE](https://github.com/Gojo-Bots/Gojo_Satoru/blob/main/Powers/vars.py)
|
224 |
-
|
225 |
-
</details>
|
226 |
-
|
227 |
-
---------
|
228 |
-
|
229 |
-
# Adding your own plugin
|
230 |
-
|
231 |
-
To add your very own plugin just use the format given below and go through the [utils](https://github.com/Gojo-Bots/Gojo_Satoru/blob/master/Powers/utils) and [custom_filters](https://github.com/Gojo-Bots/Gojo_Satoru/blob/master/Powers/utils/custom_filters.py)
|
232 |
-
|
233 |
-
```python
|
234 |
-
from traceback import format_exc
|
235 |
-
|
236 |
-
from Powers.utils.custom_filters import command
|
237 |
-
from Powers import LOGGER
|
238 |
-
from Powers.bot_class import Gojo
|
239 |
-
# All the import provided above is mandatory in case you don't want to use logger remove the first and third import
|
240 |
-
# Import more functions and modules as per your need
|
241 |
-
|
242 |
-
@Gojo.on_message(command("<your command>")) # Pass additional filters if you need
|
243 |
-
async def <function name>(<arguments to take>):
|
244 |
-
<your code>
|
245 |
-
|
246 |
-
'''use logger to add log info using LOGGER.info(<string>) in the platform on which bot is running
|
247 |
-
and error as LOGGER.error(<string>) and after LOGGER.error() use
|
248 |
-
LOGGER.error(format_exc())'''
|
249 |
-
|
250 |
-
__PLUGIN__ = <name of plugin> # Pass the name of your plugin as string
|
251 |
-
_DISABLE_CMDS_ = [<command as string>] # Enter the commands if you want so that they can be disabled if needed.
|
252 |
-
|
253 |
-
__alt_name__ = [<command as string>] # Alternative name of the plugin
|
254 |
-
|
255 |
-
__HELP__ = <string> # To tell about your plugin and commands you must use it
|
256 |
-
|
257 |
-
|
258 |
-
# See any plugin to get more information about how to make a plugin
|
259 |
-
|
260 |
-
|
261 |
-
```
|
262 |
-
# Add plugins in [plugin](https://github.com/Gojo-Bots/Gojo_Satoru/tree/master/Powers/plugins) section
|
263 |
-
## **Note** : Don't use <> this bracket while writing the code...
|
264 |
-
|
265 |
-
--------
|
266 |
-
|
267 |
-
# Contributors
|
268 |
-
|
269 |
-
[](https://github.com/Gojo-Bots/Gojo_Satoru/graphs/contributors)
|
270 |
-
|
271 |
-
|
272 |
-
---------
|
273 |
-
|
274 |
-
# Special Thanks ❤️
|
275 |
-
|
276 |
-
<!----<p align='left'>
|
277 |
-
<a href="https://github.com/iamPSYREX"><img src="https://avatars.githubusercontent.com/u/90316018?v=4" width="300"
|
278 |
-
height="300 alt="PSYREX"></a></br></br>
|
279 |
-
|
280 |
-
</p>--->
|
281 |
-
|
282 |
-
Some special thanks to the person/repo who/which helped and motivated me to create this project
|
283 |
-
|
284 |
-
* [PSYREX](https://github.com/iamPSYREX) for logos and motivating me and giving me new ideas.
|
285 |
-
|
286 |
-
* [Dan](https://github.com/delivrance) for [pyrogram](https://github.com/pyrogram/pyrogram) `library`
|
287 |
-
|
288 |
-
* [Anand](https://github.com/HellBoy-OP) for helping me to enhance the bot's security and look and also helping me out with various stuff and bugs and also for motivating me to create this project.
|
289 |
-
|
290 |
-
* [Alita_Robot](https://github.com/divideprojects/Alita_Robot) for base code.
|
291 |
-
|
292 |
-
* [WilliamButcherBot](https://github.com/TheHamkerCat/WilliamButcherBot) for few plugins inspirations.
|
293 |
-
|
294 |
-
---------
|
295 |
-
|
296 |
-
# Powered by [ɢօʝօ ɮօȶֆ](https://github.com/Gojo-Bots)
|
297 |
-
|
298 |
-
|
299 |
-
<p align='left'>
|
300 |
-
<a href="https://github.com/Gojo-Bots"><img src="https://artfiles.alphacoders.com/160/160160.jpeg" alt="Gojo Bots"></a></br></br>
|
301 |
-
|
302 |
-
</p>
|
303 |
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Powers Control Panel ⚡
|
3 |
+
emoji: 🕹️
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: indigo
|
6 |
+
sdk: streamlit
|
7 |
+
sdk_version: "1.23.0" # You can adjust based on your streamlit version
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
|
12 |
+
# Powers Control Panel ⚡
|
|
|
|
|
13 |
|
14 |
+
This is a **Streamlit web app** to control the `powers` Python module with Start and Stop buttons!
|
15 |
|
16 |
+
## Features:
|
17 |
+
- **Start Button:** Launches `python3 -m powers` as a background process.
|
18 |
+
- **Stop Button:** Terminates the running process.
|
19 |
+
- **Real-time Status Display:** Shows whether the process is currently running.
|
20 |
|
21 |
+
## How to Run Locally:
|
22 |
+
1. Clone the repository:
|
23 |
+
```bash
|
24 |
+
git clone <your-repo-url>
|
25 |
+
cd <your-repo-name>
|
26 |
|
27 |
|
28 |
|
29 |
+
# Powers Control Panel ⚡
|
|
|
30 |
|
31 |
+
This is a **Streamlit web app** to control the `powers` Python module with Start and Stop buttons!
|
|
|
32 |
|
33 |
+
## Features:
|
34 |
+
- **Start Button:** Launches `python3 -m powers` as a background process.
|
35 |
+
- **Stop Button:** Terminates the running process.
|
36 |
+
- **Real-time Status Display:** Shows whether the process is currently running.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
+
## How to Run Locally:
|
39 |
+
1. Clone the repository:
|
40 |
+
```bash
|
41 |
+
git clone <your-repo-url>
|
42 |
+
cd <your-repo-name>
|