- YouTube, Spotify, and Soundcloud playback support
- Sponsorblock integration
- Lots of QoL features to make the experience smooth
- Amazing support from the bot's developer
- Docker support for easy hosting
Important
This assumes you have Docker and Docker Compose installed and working correctly.
- Copy the docker-compose.yml file:
version: '3.7'
services:
lavalink:
container_name: twm_lavalink
image: ghcr.io/lavalink-devs/lavalink:4
restart: on-failure
environment:
- SERVER_PORT=2333
- SERVER_ADDRESS=0.0.0.0
- LAVALINK_SERVER_PASSWORD=youshallnotpass
volumes:
- ./lavalink/application.yml:/opt/Lavalink/application.yml
- ./lavalink/plugins:/opt/Lavalink/plugins/
healthcheck:
test: 'curl -H "Authorization: youshallnotpass" -s http://localhost:2333/version'
interval: 10s
timeout: 10s
retries: 5
start_period: 10s
postgres:
container_name: twm_postgres
image: postgres:latest
restart: on-failure
environment:
POSTGRES_DB: twm
POSTGRES_USER: postgres
POSTGRES_PASSWORD: twmIsAwesome
volumes:
- ./postgres-data:/var/lib/postgresql/data
discord-bot:
container_name: twm
image: reishimanfr/the-world-machine:latest
environment:
# Your discord bot token. Never show it to anyone
- BOT_TOKEN=
# Time after which the bot will leave vc if inactive (in minutes)
- PLAYER_TIMEOUT=10
# This is only needed if you want the starboard feature
# to embed tenor gifs. You can safely ignore it.
- TENOR_API_KEY=null
# Create a new empty guild and paste it's ID here. You
# only have to do this once.
- CUSTOM_EMOJIS_GUILD_ID=1234567890
# Changes if (/) commands should be registered on bot startup.
- REGISTER_COMMANDS_ON_START=true
# This changes if the bot should leave servers where it's
# been inactive for 3 months.
- LEAVE_INACTIVE_GUILDS=true
# Don't change these unless you know what you're doing
- LOG_LEVEL=info
# Lavalink stuff
- LAVALINK_HOST=lavalink
- LAVALINK_PORT=2333
- LAVALINK_PASSWORD=youshallnotpass
# Postgres stuff
- DATABASE_DIALECT=postgres
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_NAME=twm
- DATABASE_USERNAME=postgres
- DATABASE_PASSWORD=twmIsAwesome
- DOCKER=true
volumes:
- ./:/usr/src/app
restart: on-failure
depends_on:
- lavalink
- postgres
- Edit the environment variables like the bot token
cd
into the folder where you placed the compose file
cd path/to/the/folder
- Build the container
docker-compose up -d
To update, run this command:
docker-compose up --force-recreate -d
If you want to provide your application.yml file for lavalink:
- Create a new directory in the root folder called
lavalink
mkdir lavalink
- Create a file called
applcation.yml
and fill it out according to your needs.
touch application.yml
nano application.yml
- Clone the source code
git clone https://github.com/Reishimanfr/The-World-Machine-Bot
- Go into the newly created directory
cd The-World-Machine-Bot
- Install dependencies
npm i --omit=dev
- Rename the
.env.example
file to.env
and fill it out - Start the bot
npm start
Join the support server... or message me on discord directly! (@rei.shi)