Neutron is still in the early development stage so there aren't many features available yet but we're aiming to change that soon.
If you want to run this bot on your own, you can simply follow this guide:
- Create bot on Discord's bot portal
- Make a New Application
- Go to Bot settings and click on Add Bot
- Make sure to give the bot indents it needs, this bot requires server member intent
- Give Administrator permission to bot
- You will find your bot TOKEN there, it is important that you save it
- Go to OAuth2 and click bot, than add Administrator permissions
- You can follow the link that will appear to add the bot to your discord server
You can run your application contained within a docker container, which is quite easy and very fast, this means you won't have to set up all the needed services for the bot, such as the postgresql database and the bot will run for you automatically. All you need to do is install docker. Run it as a service and use docker-compose up
within the clonned project. You will need to have BOT_TOKEN
environment variable set, with your bot token so that the bot can connect to your discord application.
You can also run the bot without using docker at all, even though using docker is more convenient and easier, sometimes you might want to run directly, because you might not have enough resources to spin up whole containers or you simply don't want to install docker. Even though we recommend docker installation over bare-bones one, it is important to mention it too.
In order to prevent cluttering the README too much, here's a link to official documentation regarding installation: Official PostgreSQL installation tutorial Note that the installation steps will differ depending on your operating system. Make sure to only follow the installation steps specific to your operating system.
After you made a database and a user with some password for it. You can tell the bot about it using environmental variabls:
DATABASE_NAME="bot"
This is the name of your databaseDATABASE_USER="bot"
This is the username (ideally this shouldn't be postgres directly, but it can be)DATABASE_PASSWORD="bot"
This is the password associated with that user accountDATABASE_HOST="127.0.0.1"
This defaults to127.0.0.1
(localhost), but if you are running the database remotely, you'll want to adjust this
- Clone the repository (or fork it if you want to make changes)
- Install poetry
pip install poetry
- Build the virtual enviroment from poetry.lock
poetry install
- Create
.env
file for your environmental variables with:BOT_TOKEN=[Your bot token]
, this is tells the bot how to connect to your discord applicationCOMMAND_PREFIX=[Your prefix]
, this is optional and will default to>>
, if you want different prefix, change this- Rest of the postgresql config, as shown in the postgresql section
- Configure the settings (More about this in Settings section)
- Run the bot
poetry run task start