This repository and the support this Python version of CherngBot will be terminated due to a development cessation of discord.py library this version of Cherngbot rely on.
Further explanation can be found in here.
Thank you for your understanding.
The rewrite (JavaScript) version of this CherngBot is not intended to be open-source until further decisions are made in the process of development.
This bot was initially made as a midterm project for Programming Methodology I. What you are seeing in this repository is the extension of that project. However, I still keep improving its feature sets while I learn new aspect of Python and programming.
The word "Cherng" in the name of this bot came from a transliteration of เชิง /t͡ɕʰɤːŋ/, a word in Thai language which means something close to "finesse" or "artifice" in English. Yes, I want this bot to be clever, cunning, and tact. Also, my friends use this word a lot in our conversation. (I guess it sounds very wrong, but for Thai people, please ignore it. Something was surely lost in translation.)
For elaborate feature list and future features, see the Trello page
- Custom prefix
- Dynamic help function
- Clear message command in text channel
- Invite friends with searched games (Only works for Steam)
- Bonk command
- Reddit memes
- Quick reload cogs for owner
- More to comes...
I wrote this bot using Python 3.9.5 on Debian 10 system. The minimum required version of Python is 3.6 I also use MongoDB Atlas as a database service of my choice.
The version listed below represents the environment I am working with, I cannot guarantee the compatability for older version of these modules.
- aiohttp - 3.7.4.post0
- discord.py - 1.7.2 (Might get rewrite in the future since discord.py v2.0 is coming)
- dnspython - 2.1.0
- google-api-python-client - 2.6.0
- motor - 2.4.0
- steam - 1.2.0 (Planned to replace due to blocking nature of the library)
-
You have to provide these secrets (credentials) to
.env
file. -
Install required python modules using
requirements.txt
. For example, if you are using pip in your environment, run
pip install -r requirements.txt
- Configure the name of MongoDB collections inside
configs.py
to match your database structure. This is my structure as an example, you should change the code to match your structure, not change your structure to match my stucture.
Also, you might have to change your database query (Found inconfigs.py
andsteam.py
)
Cluster
├─── userData
│ └─── steam
│ ├── { _id:<discord_user_id1> ...
│ ├── { _id:<discord_user_id2> ...
│ │ ...
│
└─── server
└─── settings
├── { _id:<discord_server_id1> ...
├── { _id:<discord_server_id2> ...
│ ...
- Configure anything that you want, add your own taste, or change color palette.
Prevent any extentsion (cog) from loading by adding _ in front of the file name (For example:_funny.py
)
Then, just run main.py
,and don't forget to invite your own bot into your own Discord server to use it.
I highly recommend inviting your bot to the server while it's running. Or else it will force you to create your own prefixes.json
file (with server id as keys, and prefix as values) inside the root of this directory, since I haven't implement any check yet in this version
If you don't want to fiddle with my messy code files for some setting that might not even exist, my bot is currently running 24/7 on Google Cloud Platform, you can invite it to your server using...
Currently unavailable.
Discord: best4281 (Please DM me first, I don't want to add people randomly)