/Vale.py

A bot to support Discord servers that I like.

Primary LanguagePythonMIT LicenseMIT

Vale.py

A bot to support Discord servers that I like.

   


This bot is under active development!

For now it doesn't make much sense to invite the bot since it won't be online though. The bot is incomplete yet as well as this README but feel free to contribute if you spot a bug or have a suggestion on how to improve the bot!

Installation


Of course you can self-host the bot if you want to work on it, but I'd rather prefer that you invite it to your guild instead of hosting your own instance of it.

Get Python 3.6.5+


Any Python version higher or equal to 3.6.5 can be used to run the bot.

Download or clone this repository and install the dependencies


After you got the source code of the bot, run

    python3 -m pip install -U -r requirements.txt

to install all the requirements the bot has.

Setup PostgreSQL on your machine


You can download and install it from here

It is important since you'll need a PostgreSQL database to connect your bot to. The newest version should be fine but you'll need at least PostgreSQL 9.5.

Type the following code into the psql tool:

    CREATE ROLE valepy WITH LOGIN PASSWORD 'your_password';
    CREATE DATABASE valepy OWNER valepy;
    CREATE EXTENSION pg_trgm;

Run the bot


Now everything you need to do is to run the bot. Open your Console and type

    # Windows:
    py -3 bot.py

    # Linux & macOS:
    python3 bot.py

to run the bot. Now the bot will create a file called config.json. You need to add the required information through the console. But you can also create a config.json file manually before starting the bot for the first time. It should look like:

    {
        "owner_id": "301790265725943808 (Replace this with your ID)",
        "pg_db": "valepy",
        "pg_host": "127.0.0.1",
        "pg_pass": "your_password",
        "pg_port": "5432",
        "pg_user": "valepy",
        "token": "Your bot token",
        "jdoodle_client": "Your JDoodle Client-ID",
        "jdoodle_secret": "Your JDoodle Client-Secret"
    }