managementbot / README.md
Captain Ezio
Update README.md
4cbb3d3
|
raw
history blame
12.2 kB
<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>
------
[![GitHub forks](https://img.shields.io/github/forks/Gojo-Bots/Gojo_Satoru?style=social)](https://github.com/Gojo-Bots/Gojo_Satoru/fork)
![GitHub Repo stars](https://img.shields.io/github/stars/Gojo-Bots/Gojo_Satoru?style=social)
![Repo Size](https://img.shields.io/github/repo-size/Gojo-Bots/Gojo_Satoru?&style=social&logo=github)
![Branch](https://img.shields.io/badge/Branch-Main-white?&style=social&logo=github)
![Maintenance](https://img.shields.io/badge/Maintained%3F-Yes-white?&style=social&logo=hugo)
![GitHub license](https://img.shields.io/github/license/Gojo-Bots/Gojo_Satoru?&style=social&logo=github)
![Python](https://img.shields.io/badge/Python-v3.10-white?style=social&logo=python)
![GitHub language count](https://img.shields.io/github/languages/count/Gojo-Bots/Gojo_Satoru?&style=social&logo=hyper)
**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)
---------
## 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
[![GPLv3](https://www.gnu.org/graphics/gplv3-127x51.png)](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 😉
[![DEPLOY](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Gojo-Bots/Gojo_Satoru.git)
-------
## Deploy To Railway
[![DEPLOY](https://railway.app/button.svg)](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
[![Develop on Okteto](https://okteto.com/develop-okteto.svg)](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 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 Development class, not 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 current directory by `cd Gojo_Satoru`
* Edit the vars file by `nano Powers/vars.py`
* Fill in all the variables in Development class, not Config class. Sudo, Dev, 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 commang
```
docker run --env-file main.env gojo_gojo_satoru
```
If all works well, bot should send message to the MESSAGE_DUMP Group!--->
## Variables
`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)
`PREFIX_HANDLER` Your bot handler which will activate commands
`DB_URI` Your [MongoDB](https://www.mongodb.com/) connection string.
<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.
`AuDD_API` Your [Audd api](https://audd.io/) to get info of song by music file.
`BDB_URI` Your mongodb uri different from 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 where user's can contact in case of a problem.
`MESSAGE_DUMP`: Event logs channel where bot will send updates. Note that id should starts with `-100`.
`VERSION`: A Version to be shown in bot.
`PREFIX_HANDLER`: Something like '/' to execute commands.
`SUPPORT_CHANNEL`: Your Telegram support channel username where user's can see updates of bot.
`DEV_USERS`: ID of users who are Devs of your bot. Use space to seprate values.
`SUDO_USERS`: A space separated list of user IDs who you want to assign as sudo users.
`WHITELIST_USERS`: A space separated list of user IDs whitelisted, cannot be restricted.
⚠️ **Note:** In case you are passing more than one value seprate them using whitespace (space) for e.g. 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 mandotry in case you don't want to use logger remove the first and third import
# Import more funcs and module 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 platfrom 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 that they can be disabled if needed.
__alt_name__ = [<command as string>] # Alternative name of the plugin
__HELP__ = <string> # To tell about you 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
[![Contributors](https://contrib.rocks/image?repo=Gojo-Bots/Gojo_Satoru)](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 for creating this project
* [PSYREX](https://github.com/iamPSYREX) for logos and motivatting 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 bot's security and look and also helping me out with various stuffs and bugs and also for motivating me to create this project.
* [Alita_Robot](https://github.com/divideprojects/Alita_Robot) for base code.
---------
# 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>