Clone the repo
Make sure you have python3.8 and postgresql
Setting up the database and roles
Inviting the bot to your server, there will be an invite link in the python shell after you run it.
~$ git clone https://github.com/AnotherCat/message-manager.git # Clone this github repo~$ cd message-manager # Navigate to the main directory for the project.~/message-manager$ pipenv install # Install the required python packages with pipenv# Now you need to setup the config variables, see Config below(bot-env) ~/message-manager$ pipenv run python3.8 main.py # Run the bot
Note: This assumes that you have the following packages installed:
Some commands may require sudo privileges depending on your system.
For windows do the same, but replace
This bot uses a
config.py file to store config.
Create a role for the bot to use
Create the database
$sudo -u postgres psqlpostgres=# CREATE ROLE bot LOGIN PASSWORD 'password' SUPERUSER; # Create the role for the bot to use. You can do it without superuser, look up the docs to see what's needed.postgres=# CREATE DATABASE bot OWNER bot; # Create a database with the same name as the role, so that you can login easierpostgres=# CREATE DATABASE message_bot OWNER bot; # Create the database the bot will usepostgres=# \q
Then enter the values into the postgres_uri config.
Set the values as per the table below
Discord Bot Token
This is the discord bot token.
This is the default prefix before commands. If a server prefix this will be overridden.
This will appear in the info box from the
These are users who get "admin" access to the bot, they can run bot dev only commands.
This gives the bot access to the database. You'll need to setup a postgres user and database.
see config file
This is the maxium amount of guild-settings that will be cached before infrequently used ones are dropped
This is the amount of guilds that will be removed from the cache when it exceeds it's max size
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:
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.