โ๐๐ก๐ ๐๐จ๐ฌ๐ญ ๐๐จ๐ฐ๐๐ซ๐๐ฎ๐ฅ๐ฅ ๐๐ซ๐จ๐ฎ๐ฉ ๐๐๐ง๐๐ ๐๐ฆ๐๐ง๐ญ ๐๐จ๐ญโ
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.
python3 -m mrjoker
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 stringAPI_ID & API_HASH: Get API_ID & API_HASH from my.telegram.org, used for telethon based modules.SQLALCHEMY_DATABASE_URI: Your database URLOWNER_ID: An integer of consisting of your owner IDOWNER_USERNAME: Your username (without the @)SUPPORT_CHAT: Your Telegram support group chat usernameEVENT_LOGS: Event logs channel to note down important bot level events, recommend to make this public. ex:-100:123JOIN_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 fromTIME_API_KEY: Required for timezone information. Get yours fromDEV_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 @SpamWatchBotSTRICT_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 usersDEMONS: 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 isWEBHOOK: Setting this to ANYTHING will enable webhooks. If you dont know how this works leave it as it isPORT: Port to use for your webhooks. Better leave this as it is on herokuURL: The Heroku App URL :-https://<appname>.herokuapp.comNo_LOAD: Dont load these modules cause they shit, space separationBL_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 TrueDEL_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 fromBAN_STICKER: ID of the sticker you want to use when banning peopleWALL_API: Required for wallpaper. Get your's fromARQ_API_URL: https://thearq.tech/ ๐ Fill in this wayARQ_API_KEY: Start this boat https://t.me/ARQRobot. Get the keyREM_BG_API_KEY: Go to this site https://www.remove.bg/api#remove-background. Get your api keyGENIUS_API_TOKEN: Go to this site https://docs.genius.com/. Get your api token
pip3 install -U -r requirements.txt
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
