Spaces:
Running
Running
File size: 12,461 Bytes
67c6984 adae6fc b7db6f0 d3a0b37 b7db6f0 d3a0b37 b32448f fc228c8 b7db6f0 7956eb0 67c6984 7956eb0 42e02dc adae6fc 32ce287 adae6fc 32ce287 adae6fc 32ce287 adae6fc 7956eb0 42e02dc 7956eb0 2a7bf9b 0adc9bc 67c6984 72d676c aea5e81 2fc8036 3b12f07 ab27acb 3588d38 7956eb0 67c6984 7956eb0 fbfb4d6 54f0c6f fbfb4d6 adae6fc fbfb4d6 5a78342 7956eb0 724a1df 3ac34e5 c76e625 724a1df ca8bc87 dee310b fbfb4d6 acbc336 7956eb0 72d676c 67c6984 7956eb0 72d676c 7956eb0 a4bcf94 7956eb0 a4bcf94 7956eb0 a4bcf94 7956eb0 adae6fc 7956eb0 54d0bf2 7956eb0 2d95fd0 7956eb0 adae6fc 7956eb0 adae6fc 7956eb0 9260967 b81a368 2d95fd0 724a1df 54d0bf2 c09c107 adae6fc 54d0bf2 2b2f7f0 54d0bf2 adae6fc 54d0bf2 c09c107 54d0bf2 556a084 43f00c6 c09c107 acd7654 54d0bf2 a8a7257 724a1df adae6fc 724a1df 43f00c6 3743160 724a1df 0a9b46e 3743160 43f00c6 3743160 43f00c6 3743160 5fc37f6 adae6fc 5fc37f6 43f00c6 5fc37f6 adae6fc 5fc37f6 43f00c6 7956eb0 43f00c6 f0d9e2e 7956eb0 f0d9e2e 3c05ff4 3588d38 43f00c6 7956eb0 d6fb245 d7e1221 fafdc92 d7e1221 43f00c6 d7e1221 fafdc92 d6fb245 43f00c6 d6fb245 43f00c6 d6fb245 43f00c6 d6fb245 43f00c6 d6fb245 43f00c6 d6fb245 2e265b6 43f00c6 d6fb245 2fd3259 67c6984 aea5e81 adae6fc aea5e81 4889d13 aea5e81 4889d13 aea5e81 4889d13 43f00c6 aea5e81 0adc9bc aea5e81 43f00c6 aea5e81 43f00c6 d76971a aea5e81 43f00c6 2aa853f aea5e81 adae6fc 2aa853f 1559746 aea5e81 b01a630 ebc0ff7 b01a630 adae6fc b01a630 67c6984 ebc0ff7 c2d0795 ebc0ff7 c2d0795 cd3ee79 ebc0ff7 c2d0795 cd3ee79 c2d0795 43f00c6 d720c41 43f00c6 c2d0795 dacf666 3b12f07 43f00c6 d720c41 3588d38 67c6984 7956eb0 baae70c 7956eb0 ebc0ff7 d720c41 ebc0ff7 7956eb0 |
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 |
<h1 align="center">
<b> Gojo_Satoru </b>
<!---</h1>
<h1 align="center"><img src="https://media.giphy.com/media/GL42TduR8AkNq1xRog/giphy.gif" /></h1>--->
<!---<h1 align="center"><img src="https://te.legra.ph/file/4bf3b88115068d41efadd.jpg" /></h1>--->
<h1 align="center"><img src="./extras/gojo_satoru__psd__by_at_yomiko_deyaec4-pre.jpg" /></h1>
------
[](https://github.com/Gojo-Bots/Gojo_Satoru/fork)







**A python and [pyrogram](https://github.com/Gojo-Bots/pyrogram) based group management bot for telegram.
If you like the bot make sure to give a ⭐ __star__ ⭐ to this respository and feel free to updating and sending pull requests**
---------
## Inspiration ✨
Not a particular inspiration, inspired by many bots
Mainly:
* [Alita_Robot](https://github.com/divideprojects/Alita_Robot)
* [WilliamButcherBot](https://github.com/TheHamkerCat/WilliamButcherBot)
---------
## About
<h1 align="center"><img src="./extras/original.gif" /></h1>
The Gojo Satoru is a powerful Group Management bot with awesome plugins and features.
**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.**
## Features
* Modern
* Fast
* Fully asynchronous
* Fully open-source
* Frequently updated
***Can be found on Telegram as __[@GojoSuperbot](https://telegram.dog/GojoSuperbot)__***
* Feel free to give ideas for next update. Drop your ideas [here](https://github.com/Gojo-Bots/Gojo_Satoru/discussions/new?category=ideas)
-------
## License
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
<br>Licensed Under <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU General Public License v3</a>
---------
# DEPLOYMENT 🚀
## Deploy To Heroku
* **Make Sure you have Heroku account**
* 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
* Just click on the button it will redirect you to Heroku website and deploy your bot there....enjoy 😉
[](https://heroku.com/deploy?template=https://github.com/Gojo-Bots/Gojo_Satoru.git)
-------
## Deploy To Railway
[](https://railway.app)
### How To Deploy On Railway
* **Make Sure You have an github account which is minimum 30 days old.**
* Fork the repo by clicking [here](https://github.com/Gojo-Bots/Gojo_Satoru/fork)
* Click on [deploy](https://railway.app) button
* Login in railway using github account
* Now search the repo in the search bar given like iamgojoof6eyes/Gojo_Satoru ***replace iamgojoof6eyes with your github username.***
* 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***
* Then wait for 10-15 minutes.
* Vars are [given below](#Variables)
* ***The bot can be used by provideing mandotry variables only..***
--------
## Deploy To Okteto
[](https://cloud.okteto.com/deploy?repository=https://github.com/Gojo-Bots/Gojo_Satoru)
### How To Deploy On Okteto
* **Make sure you have an github account.**
* [Fork](https://github.com/Gojo-Bots/Gojo_Satoru/fork) the repo and give a star to repo
* Click on [deploy](https://cloud.okteto.com/deploy?repository=https://github.com/Gojo-Bots/Gojo_Satoru) button provided above...
* Login using github.
* Fill the values
* Then wait for 10-15 minutes.
* Vars are [given below](#Variables)
* ***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`***
***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***
--------
## Deploy locally
### Using git
* Install Python v3.7 or later from Python's Website
* Install virtualenv using `python3 -m pip -U install virtualenv`.
* Fork or Clone the project using `git clone https://github.com/Gojo-Bots/Gojo_Satoru.git`
* Create Virtualenv using: `virtualenv venv`
* Install the requirements using `python3 -m pip install -r requirements.txt`
* Fill in all the variables in the Development class, not the Config class. Sudo, Dev, Whitelist users are optional!!
* If you want, you can remove all the things
* Change to virtualenv shell by using: `. venv/bin/activate (Linux) venv\Scripts\activate (Windows)`
* Run the bot using `python3 -m Powers`
### Traditional method:
* Update apt by using `sudo apt update && sudo apt upgrade -y`
* 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`
* Clone the GitHub repo by `https://github.com/Gojo-Bots/Gojo_Satoru`
* Now make it the current directory by `cd Gojo_Satoru`
* Edit the vars file by `nano Powers/vars.py`
* Fill in all the variables in the Development class, not the Config class. Sudo, Dev, and Whitelist users are optional!!
* Create and activate a new virtualenv by `virtualenv venv source venv/bin/activate`
* Install requirements to run the bot by `pip3 install -r requirements.txt`
* After requirements are installed, start the bot by `python3 -m Powers`
* Exit the window `CTRL + B` then `D`
<!---### Using docker
* Clone the repo and enter into it
* Install [Docker](https://www.docker.com/)
* Fill in the `sample.env` file and rename it to `main.env`.
* Now follow the steps:
To build the docker image **(The dot '.' at last is necessary!)**:
```
docker build -t gojo_gojo_satoru:latest .
```
To run copy and paste the following command
```
docker run --env-file main.env gojo_gojo_satoru
```
If all works well, the bot should send a message to the MESSAGE_DUMP Group!--->
## Variables
<details><summary><h3>List of all mandatory variables</h3></summary>
`BOT_TOKEN` You can get your bot token at [@BotFather](https://t.me/BotFather)
`API_ID` You can get your api id [here](my.telegram.org)
`API_HASH` You can get your api hash [here](my.telegram.org)
`DB_URI` Your [MongoDB](https://www.mongodb.com/) connection string.
`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.
</details>
<details><summary><h3>List of all variables</h3></summary>
`BOT_TOKEN` You can get your bot token at [@BotFather](https://telegram.dog/BotFather)
`API_ID` You can get your api id [here](my.telegram.org)
`API_HASH` You can get your api hash [here](my.telegram.org)
`PREFIX_HANDLER` Your bot handler which will activate commands
`DB_URI` Your [MongoDB](https://www.mongodb.com/) connection string.
`DB_NAME` Your [MongoDB](https://www.mongodb.com/) database name.
`OWNER_ID` Your user ID as an integer.
`GENIUS_API` Your Lyrics [Genius Api Token](https://docs.genius.com/#/getting-started-h1). To fetch lyrics of songs.
`BDB_URI` Your mongodb uri is different from the previous one to store more info.
`TIME_ZONE` Your time zone.
`RMBG_API` Your [removebackground api](https://www.remove.bg/api#remove-background) to remove the background/
`SUPPORT_GROUP`: Your Telegram support group chat username that users can contact in case of a problem.
`PREFIX_HANDLER`: Something like '/' to execute commands.
`SUPPORT_CHANNEL`: Your Telegram support channel username where users can see bot updates.
`DEV_USERS`: ID of users who are Devs of your bot. Use space to separate values.
`SUDO_USERS`: A space-separated list of user IDs you want to assign as sudo users.
`WHITELIST_USERS`: A space-separated list of user IDs whitelisted, cannot be restricted.
`CHROME_BIN`: Location of your chrome bin.
`CHROME_DRIVER`: Location of your chrome driver.
⚠️ **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
I'll pass it like `'/' '.' '!'` this.
YOU CAN ALSO HAVE A LOOK AT [VARS FILE](https://github.com/Gojo-Bots/Gojo_Satoru/blob/main/Powers/vars.py)
</details>
---------
# Adding your own plugin
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)
```python
from traceback import format_exc
from Powers.utils.custom_filters import command
from Powers import LOGGER
from Powers.bot_class import Gojo
# All the import provided above is mandatory in case you don't want to use logger remove the first and third import
# Import more functions and modules as per your need
@Gojo.on_message(command("<your command>")) # Pass additional filters if you need
async def <function name>(<arguments to take>):
<your code>
'''use logger to add log info using LOGGER.info(<string>) in the platform on which bot is running
and error as LOGGER.error(<string>) and after LOGGER.error() use
LOGGER.error(format_exc())'''
__PLUGIN__ = <name of plugin> # Pass the name of your plugin as string
_DISABLE_CMDS_ = [<command as string>] # Enter the commands if you want so that they can be disabled if needed.
__alt_name__ = [<command as string>] # Alternative name of the plugin
__HELP__ = <string> # To tell about your plugin and commands you must use it
# See any plugin to get more information about how to make a plugin
```
# Add plugins in [plugin](https://github.com/Gojo-Bots/Gojo_Satoru/tree/master/Powers/plugins) section
## **Note** : Don't use <> this bracket while writing the code...
--------
# Contributors
[](https://github.com/Gojo-Bots/Gojo_Satoru/graphs/contributors)
---------
# Special Thanks ❤️
<!----<p align='left'>
<a href="https://github.com/iamPSYREX"><img src="https://avatars.githubusercontent.com/u/90316018?v=4" width="300"
height="300 alt="PSYREX"></a></br></br>
</p>--->
Some special thanks to the person/repo who/which helped and motivated me to create this project
* [PSYREX](https://github.com/iamPSYREX) for logos and motivating me and giving me new ideas.
* [Dan](https://github.com/delivrance) for [pyrogram](https://github.com/pyrogram/pyrogram) `library`
* [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.
* [Alita_Robot](https://github.com/divideprojects/Alita_Robot) for base code.
* [WilliamButcherBot](https://github.com/TheHamkerCat/WilliamButcherBot) for few plugins inspirations.
---------
# Powered by [ɢօʝօ ɮօȶֆ](https://github.com/Gojo-Bots)
<p align='left'>
<a href="https://github.com/Gojo-Bots"><img src="https://artfiles.alphacoders.com/160/160160.jpeg" alt="Gojo Bots"></a></br></br>
</p>
|