Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
43f00c6
1
Parent(s):
4eddd16
Update README.md
Browse files
README.md
CHANGED
|
@@ -114,7 +114,7 @@ The Gojo Satoru is a powerful Group Management bot with awesome plugins and feat
|
|
| 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 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 |
|
|
@@ -128,7 +128,7 @@ The Gojo Satoru is a powerful Group Management bot with awesome plugins and feat
|
|
| 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 Development class, not 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`
|
|
@@ -138,9 +138,9 @@ The Gojo Satoru is a powerful Group Management bot with awesome plugins and feat
|
|
| 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 current directory by `cd Gojo_Satoru`
|
| 142 |
* Edit the vars file by `nano Powers/vars.py`
|
| 143 |
-
* Fill in all the variables in Development class, not Config class. Sudo, Dev, 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`
|
|
@@ -156,22 +156,23 @@ The Gojo Satoru is a powerful Group Management bot with awesome plugins and feat
|
|
| 156 |
```
|
| 157 |
docker build -t gojo_gojo_satoru:latest .
|
| 158 |
```
|
| 159 |
-
To run copy and paste the following
|
| 160 |
```
|
| 161 |
docker run --env-file main.env gojo_gojo_satoru
|
| 162 |
```
|
| 163 |
-
If all works well, bot should send message to the MESSAGE_DUMP Group!--->
|
| 164 |
|
| 165 |
## Variables
|
|
|
|
|
|
|
| 166 |
`BOT_TOKEN` You can get your bot token at [@BotFather](https://t.me/BotFather)
|
| 167 |
|
| 168 |
`API_ID` You can get your api id [here](my.telegram.org)
|
| 169 |
|
| 170 |
`API_HASH` You can get your api hash [here](my.telegram.org)
|
| 171 |
|
| 172 |
-
`PREFIX_HANDLER` Your bot handler which will activate commands
|
| 173 |
-
|
| 174 |
`DB_URI` Your [MongoDB](https://www.mongodb.com/) connection string.
|
|
|
|
| 175 |
|
| 176 |
|
| 177 |
<details><summary><h3>List of all variables</h3></summary>
|
|
@@ -192,31 +193,27 @@ If all works well, bot should send message to the MESSAGE_DUMP Group!--->
|
|
| 192 |
|
| 193 |
`GENIUS_API` Your Lyrics [Genius Api Token](https://docs.genius.com/#/getting-started-h1). To fetch lyrics of songs.
|
| 194 |
|
| 195 |
-
`
|
| 196 |
-
|
| 197 |
-
`BDB_URI` Your mongodb uri different from previous one to store more info.
|
| 198 |
|
| 199 |
`TIME_ZONE` Your time zone.
|
| 200 |
|
| 201 |
`RMBG_API` Your [removebackground api](https://www.remove.bg/api#remove-background) to remove the background/
|
| 202 |
|
| 203 |
-
`SUPPORT_GROUP`: Your Telegram support group chat username
|
| 204 |
-
|
| 205 |
-
`MESSAGE_DUMP`: Event logs channel where bot will send updates. Note that id should starts with `-100`.
|
| 206 |
|
| 207 |
-
`
|
| 208 |
|
| 209 |
`PREFIX_HANDLER`: Something like '/' to execute commands.
|
| 210 |
|
| 211 |
-
`SUPPORT_CHANNEL`: Your Telegram support channel username where
|
| 212 |
|
| 213 |
-
`DEV_USERS`: ID of users who are Devs of your bot. Use space to
|
| 214 |
|
| 215 |
-
`SUDO_USERS`: A space
|
| 216 |
|
| 217 |
-
`WHITELIST_USERS`: A space
|
| 218 |
|
| 219 |
-
⚠️ **Note:** In case you are passing more than one value
|
| 220 |
I'll pass it like `'/' '.' '!'` this.
|
| 221 |
|
| 222 |
YOU CAN ALSO HAVE A LOOK AT [VARS FILE](https://github.com/Gojo-Bots/Gojo_Satoru/blob/main/Powers/vars.py)
|
|
@@ -235,23 +232,23 @@ To add your very own plugin just use the format given below and go through the [
|
|
| 235 |
from Powers.utils.custom_filters import command
|
| 236 |
from Powers import LOGGER
|
| 237 |
from Powers.bot_class import Gojo
|
| 238 |
-
# All the import provided above is
|
| 239 |
-
# Import more
|
| 240 |
|
| 241 |
@Gojo.on_message(command("<your command>")) # Pass additional filters if you need
|
| 242 |
async def <function name>(<arguments to take>):
|
| 243 |
<your code>
|
| 244 |
|
| 245 |
-
'''use logger to add log info using LOGGER.info(<string>) in the
|
| 246 |
and error as LOGGER.error(<string>) and after LOGGER.error() use
|
| 247 |
LOGGER.error(format_exc())'''
|
| 248 |
|
| 249 |
__PLUGIN__ = <name of plugin> # Pass the name of your plugin as string
|
| 250 |
-
_DISABLE_CMDS_ = [<command as string>] # Enter the commands if you want that they can be disabled if needed.
|
| 251 |
|
| 252 |
__alt_name__ = [<command as string>] # Alternative name of the plugin
|
| 253 |
|
| 254 |
-
__HELP__ = <string> # To tell about
|
| 255 |
|
| 256 |
|
| 257 |
# See any plugin to get more information about how to make a plugin
|
|
@@ -278,13 +275,13 @@ To add your very own plugin just use the format given below and go through the [
|
|
| 278 |
|
| 279 |
</p>--->
|
| 280 |
|
| 281 |
-
Some special thanks to the person/repo who/which helped and motivated me
|
| 282 |
|
| 283 |
-
* [PSYREX](https://github.com/iamPSYREX) for logos and
|
| 284 |
|
| 285 |
* [Dan](https://github.com/delivrance) for [pyrogram](https://github.com/pyrogram/pyrogram) `library`
|
| 286 |
|
| 287 |
-
* [Anand](https://github.com/HellBoy-OP) for helping me to enhance bot's security and look and also helping me out with various
|
| 288 |
|
| 289 |
* [Alita_Robot](https://github.com/divideprojects/Alita_Robot) for base code.
|
| 290 |
|
|
|
|
| 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 |
|
|
|
|
| 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`
|
|
|
|
| 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`
|
|
|
|
| 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 |
+
</details>
|
| 176 |
|
| 177 |
|
| 178 |
<details><summary><h3>List of all variables</h3></summary>
|
|
|
|
| 193 |
|
| 194 |
`GENIUS_API` Your Lyrics [Genius Api Token](https://docs.genius.com/#/getting-started-h1). To fetch lyrics of songs.
|
| 195 |
|
| 196 |
+
`BDB_URI` Your mongodb uri is different from the previous one to store more info.
|
|
|
|
|
|
|
| 197 |
|
| 198 |
`TIME_ZONE` Your time zone.
|
| 199 |
|
| 200 |
`RMBG_API` Your [removebackground api](https://www.remove.bg/api#remove-background) to remove the background/
|
| 201 |
|
| 202 |
+
`SUPPORT_GROUP`: Your Telegram support group chat username that users can contact in case of a problem.
|
|
|
|
|
|
|
| 203 |
|
| 204 |
+
`MESSAGE_DUMP`: Event logs channel where the bot will send updates. Note that it should start with `-100`.
|
| 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 |
+
⚠️ **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
|
| 217 |
I'll pass it like `'/' '.' '!'` this.
|
| 218 |
|
| 219 |
YOU CAN ALSO HAVE A LOOK AT [VARS FILE](https://github.com/Gojo-Bots/Gojo_Satoru/blob/main/Powers/vars.py)
|
|
|
|
| 232 |
from Powers.utils.custom_filters import command
|
| 233 |
from Powers import LOGGER
|
| 234 |
from Powers.bot_class import Gojo
|
| 235 |
+
# All the import provided above is mandatory in case you don't want to use logger remove the first and third import
|
| 236 |
+
# Import more functions and modules as per your need
|
| 237 |
|
| 238 |
@Gojo.on_message(command("<your command>")) # Pass additional filters if you need
|
| 239 |
async def <function name>(<arguments to take>):
|
| 240 |
<your code>
|
| 241 |
|
| 242 |
+
'''use logger to add log info using LOGGER.info(<string>) in the platform on which bot is running
|
| 243 |
and error as LOGGER.error(<string>) and after LOGGER.error() use
|
| 244 |
LOGGER.error(format_exc())'''
|
| 245 |
|
| 246 |
__PLUGIN__ = <name of plugin> # Pass the name of your plugin as string
|
| 247 |
+
_DISABLE_CMDS_ = [<command as string>] # Enter the commands if you want so that they can be disabled if needed.
|
| 248 |
|
| 249 |
__alt_name__ = [<command as string>] # Alternative name of the plugin
|
| 250 |
|
| 251 |
+
__HELP__ = <string> # To tell about your plugin and commands you must use it
|
| 252 |
|
| 253 |
|
| 254 |
# See any plugin to get more information about how to make a plugin
|
|
|
|
| 275 |
|
| 276 |
</p>--->
|
| 277 |
|
| 278 |
+
Some special thanks to the person/repo who/which helped and motivated me to create this project
|
| 279 |
|
| 280 |
+
* [PSYREX](https://github.com/iamPSYREX) for logos and motivating me and giving me new ideas.
|
| 281 |
|
| 282 |
* [Dan](https://github.com/delivrance) for [pyrogram](https://github.com/pyrogram/pyrogram) `library`
|
| 283 |
|
| 284 |
+
* [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.
|
| 285 |
|
| 286 |
* [Alita_Robot](https://github.com/divideprojects/Alita_Robot) for base code.
|
| 287 |
|