Discord bot to manage the IST Hub server -- join here.
- Create a
docker-compose.ymlfile as below:
services:
ist-discord-bot:
## EITHER:
image: ghcr.io/ist-bot-team/ist-discord-bot:3
## OR:
build:
context: .
## END;
environment:
DATABASE_URL: postgresql://istbot:istbot@postgres/istbot
DISCORD_TOKEN: PLACE_BOT_TOKEN_HERE
GUILD_ID: PLACE_MAIN_GUILD_ID_HERE # or "GLOBAL" to use in multiple guilds (1hr roll-out time)
ADMIN_ID: PLACE_ADMIN_ROLE_ID_HERE
ADMIN_PLUS_ID: PLACE_ADMIN_PLUS_ROLE_ID_HERE
COMMAND_LOGS_CHANNEL_ID: PLACE_LOGGING_CHANNEL_ID_HERE
TZ: Europe/Lisbon # default timezone for crontab and other date related stuff
restart: unless-stopped
postgres:
image: postgres:18
ports:
- 127.0.0.1:5432:5432
environment:
POSTGRES_USER: istbot
POSTGRES_PASSWORD: istbot
POSTGRES_DB: istbot
volumes:
- pgdata:/var/lib/postgresql
volumes:
pgdata:- Create a folder named
datafor Docker to store things in - Run
docker-compose up -d --build - That's it!
You can also use docker-compose down, docker-compose up, docker-compose restart and docker-compose logs [-f].
Replacing CLIENT_ID with the application's public ID, access the following link:
https://discord.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot+applications.commands&permissions=8
The bot needs the Server Members Intent and the Message Content Intent enabled on Discord's Application -> Bot page. If this is not enabled, an error will be thrown on startup.
If you're looking at the source code, you should probably run
pnpm prisma:generatefirst so you can have typings.