/MR-JOKER_BOT

"POWERFULL TELEGRAM GROUP MANAGEMENT BOT"

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

โ๐“๐ก๐ž ๐Œ๐จ๐ฌ๐ญ ๐๐จ๐ฐ๐ž๐ซ๐Ÿ๐ฎ๐ฅ๐ฅ ๐†๐ซ๐จ๐ฎ๐ฉ ๐Œ๐š๐ง๐š๐ ๐ž๐ฆ๐ž๐ง๐ญ ๐๐จ๐ญโž

MR.Joker Bot

๐–๐–๐–๐’„โฑค.สโฐ™ฦ˜ฦธโฑค๐–๐–๐–

Yo,๐Ÿคกโ™‚๏ธI'm Alive..I'm a super bot ๐Ÿ”ฅ...๐Ÿšดโ€โ™‚๏ธSpeed 1 THz..Memory 1 Zettabyte.๐Ÿ•บ

A modular telegram Python bot running on python3 with an sqlalchemy database.

Originally a simple group management bot with multiple admin features, it has evolved into becoming a basis for modular bots aiming to provide simple plugin expansion via a simple drag and drop.

Deploy

Deploy To Heroku

Deploy To Railway

Deploy to Qovery

Starting the bot

Once you've setup your database and your configuration (see below) is complete, simply run:


python3 -m mrjoker

Configuration

Create a new config.py or rename sample_config.py to config.py file in same dir and import, then extend this class.

  • TOKEN : Your bot Token, As a string
  • API_ID & API_HASH : Get API_ID & API_HASH from my.telegram.org, used for telethon based modules.
  • SQLALCHEMY_DATABASE_URI: Your database URL
  • OWNER_ID : An integer of consisting of your owner ID
  • OWNER_USERNAME : Your username (without the @)
  • SUPPORT_CHAT : Your Telegram support group chat username
  • EVENT_LOGS : Event logs channel to note down important bot level events, recommend to make this public. ex: -100:123
  • JOIN_LOGGER : A channel where bot will print who added it to what group, useful during debugging or spam handling.
  • CASH_API_KEY :Required for currency converter. Get yours from
  • TIME_API_KEY : Required for timezone information. Get yours from
  • DEV_USERS : ID of users who are Devs of your bot (can use /py etc.). If you are a noob and would come and bother Mr.Joker support then keep the current ID's here at they are and add yours.
  • sw_api : Spamwatch API Token, Get one from @SpamWatchBot
  • STRICT_GBAN : Enforce gbans across new groups as well as old groups. When a gbanned user talks, he will be banned.
  • DRAGONS : A space separated list of user IDs who you want to assign as sudo users
  • DEMONS : A space separated list of user IDs who you wanna assign as support users(gban perms only)
  • TIGERS : A space separated list of user IDs who you wanna assign as tiger users.
  • WOLVES : A space separated list of user IDs who you want to assign as whitelisted - can't be banned with your bot.
  • ENV : Setting this to ANYTHING will enable environment variables. Leave it as it is
  • WEBHOOK : Setting this to ANYTHING will enable webhooks. If you dont know how this works leave it as it is
  • PORT : Port to use for your webhooks. Better leave this as it is on heroku
  • URL : The Heroku App URL :- https://<appname>.herokuapp.com
  • No_LOAD : Dont load these modules cause they shit, space separation
  • BL_CHATS : List of chats you want blacklisted.
  • ALLOW_EXCL : Set this to True if you want ! to be a command prefix along with /. Recommended is True
  • DEL_CMDS : Set this to True if you want to delete command messages from users who don't have the perms to run that command.
  • AI_API_KEY : Make your bot talk using Intellivoid's chatbot API, Get your key from
  • BAN_STICKER : ID of the sticker you want to use when banning people
  • WALL_API : Required for wallpaper. Get your's from
  • ARQ_API_URL : https://thearq.tech/ ๐Ÿ‘ˆ Fill in this way
  • ARQ_API_KEY : Start this boat https://t.me/ARQRobot. Get the key
  • REM_BG_API_KEY : Go to this site https://www.remove.bg/api#remove-background. Get your api key
  • GENIUS_API_TOKEN : Go to this site https://docs.genius.com/. Get your api token

Python dependencies

Install the necessary python dependencies by moving to the project directory and running:

pip3 install -U -r requirements.txt

Database

If you wish to use a database-dependent module (eg: locks, notes, userinfo, users, filters, welcomes), you'll need to have a database installed on your system. I use postgres, so I recommend using it for optimal compatibility.

In the case of postgres, this is how you would set up a the database on a debian/ubuntu system. Other distributions may vary

  • Install postgresql
sudo apt-get update && sudo apt-get install postgresql 

  • Change to the postgres user
sudo su - postgres

  • Create a new database user (change YOUR_USER appropriately)
createuser -P -s -e YOUR_USER

This will be followed by you needing to input your password.

  • create a new database table:

createdb -O YOUR_USER YOUR_DB_NAME

Change YOUR_USER and YOUR_DB_NAME appropriately.

  • finally:

psql YOUR_DB_NAME -h YOUR_HOST YOUR_USER

This will allow you to connect to your database via your terminal. By default, YOUR_HOST should be 0.0.0.0:5432.

You should now be able to build your database URI. This will be:

sqldbtype://username:pw@hostname:port/db_name

Replace sqldbtype with whichever db youre using (eg postgres, mysql, sqllite, etc) repeat for your username, password, hostname (localhost?), port (5000), and db name.

Support

HITECH

HITECH

CONTACT ME

Discussions

Credits

Don't forget to star this repo if you liked it.

Enjoy Your Bot! ๐Ÿ’