Skip to content

best4281/cherng-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CherngBot

Important notice

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.


Table of Contents

About

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 name

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.)

Features (version 0.0.2) ?

For elaborate feature list and future features, see the Trello page

Requirements

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.

Required Python modules

The version listed below represents the environment I am working with, I cannot guarantee the compatability for older version of these modules.

For Funny Cog
For Steam Cog
  • steam - 1.2.0 (Planned to replace due to blocking nature of the library)

Setting up

  1. You have to provide these secrets (credentials) to .env file.

  2. Install required python modules using requirements.txt. For example, if you are using pip in your environment, run

pip install -r requirements.txt
  1. 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 in configs.py and steam.py)
Cluster
├─── userData
│    └─── steam
│         ├── { _id:<discord_user_id1> ...
│         ├── { _id:<discord_user_id2> ...
│         │   ...
│   
└─── server
     └─── settings
          ├── { _id:<discord_server_id1> ...
          ├── { _id:<discord_server_id2> ...
          │   ...
  1. 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

Invite my bot

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.

Contact

Discord: best4281 (Please DM me first, I don't want to add people randomly)