Installing
I do not provide support for running your own instance of this bot other than these docs, and I would prefer if you invite the official instance instead. However you can run it if you want to, and you can reach out if you think you have found a bug. I would prefer that if you self host this bot you do not run it at scale (ie only using it in your servers).
Installation
Clone the repo
Make sure you have python3.8 and postgresql
Installing requirements
Setting up the database and roles
Creating a discord application and a bot user at the discord dev website, setup guide here
Running
main.py
Inviting the bot to your server, there will be an invite link in the python shell after you run it.
Setup Example (linux)
Note: This assumes that you have the following packages installed:
The latest version of git
The latest version of postgresql
Some commands may require sudo privileges depending on your system.
For windows do the same, but replace python3
with python
Config
This bot uses a config.py
file to store config.
Setting up PostgreSQL
Install PostgreSQL
Create a role for the bot to use
Create the database
Then enter the values into the postgres_uri config.
Setting up config
Rename
config_example.py
toconfig.py
Set the values as per the table below
Config Values
Field | Type | Value | Description | Required | Default |
token | string | Discord Bot Token | This is the discord bot token. | Yes |
|
default_prefix | string | String | This is the default prefix before commands. If a server prefix this will be overridden. | Yes |
|
owner | string | User ID | This will appear in the info box from the | No |
|
owners | Array[ID] | List[User Ids] | These are users who get "admin" access to the bot, they can run bot dev only commands. | Yes |
|
uri | string | postgres uri | This gives the bot access to the database. You'll need to setup a postgres user and database. | Yes | see config file |
guild_cache_max | integer | Int | This is the maxium amount of guild-settings that will be cached before infrequently used ones are dropped | Yes |
|
guild_cache_drop | integer | Int | This is the amount of guilds that will be removed from the cache when it exceeds it's max size | Yes |
|
Website
I really would prefer if you don't run an instance of the website. However as per the open source license terms (that i choose) i am required to provide you with installation instructions.
I use Sanic an asyncio python webframework power my site. To run it you will need to:
Clone AnotherCat/message-manager-site
Install requirements
pipenv install
See sanic's documentation for detailed instructions on how to run a sanic site.
You are also required to provide the source code to all viewers under the terms of the license, doing this and changing other references such as invite links, support server links, etc is up to you to go into the code and change.
Last updated