-
Notifications
You must be signed in to change notification settings - Fork 0
Installation (Self Hosting)
Luna Köpke edited this page Mar 13, 2023
·
3 revisions
This page will describe the full installation process.
All of the commands assume that your terminal is inside the project directory. (Either from release or clone)
-
DISCORD_TOKEN
: the token the bot uses to login into discord. -
DEBUG
: Recommended for development, doesn't create a sqlite file. (always Blank, few extra outputs) -
DATABASE_ENGINE
: specifies what sqlalchemy engine should be used. (postgress recommended, others have to be installed.) -
DATABASE_URL
: the path or url the database is stored at. (default is at /data.db)
- You need a discord account.
- You need to register a discord application on the discord developer page.
- On the page for the application, create a bot and copy the token to a save location. (This is the very important thing.)
- On the application page go to OAuth2/URL Generator create a link with scope bot and admin permission. (Is easiest that way.)
Here a list of permissions the bot needs, which helps if you don't want to give the bot admin. (Future updates might require more permissions)
-
Send Messages
is required to respond to commands! -
Read Messages
is to detect commands! -
Ban Members
is required for the!ban
command. -
Kick Members
is required for the!kick
command. -
Manage Channels
is required for the!nsfw
command. -
Change Nickname
is required for certain filters. -
Delete Messages
is required for certain filters.
only use releases or checked commits
- Make sure docker and docker-compose is installed.
- Create an .env file and put your token in there like this.
DISCORD_TOKEN=<your token here>
- Use the
docker compose up -d
(on older versionsdocker-compose up
) - The bot should now be running, if not please create an issue.
- Make sure python 3.8 or higher is installed.
python --version
2A. Create an .env file and put your token in there like this.
DISCORD_TOKEN=<your token here>
2B. Alternatively you can create a start.sh.
DISCORD_TOKEN=<your token here> python app.py
- Install the required packages
pip install -r requirements.txt
- Run the python app
python app.py
(if you created a start.shsh start.sh
)