Reporter is a discord bot that sends new Galnet articles to your server. Bot currently supports two languages: English and Czech.
- Add Reporter to your server
- Setup using the
/subscribe
command, and choose your preferred language and channel - Enjoy!
- To stop the bot from sending messages use the
/unsubscribe
command
Reporter can be setup just once per server.
Note
Reporter is currently in closed beta so is not possible to invite him to your server yet. (But will be soon!)
Command | Description |
---|---|
subscribe |
Setup/update preferences |
unsubscribe |
Remove saved preferences |
- Create an app with a bot on Discord developer portal
- Copy
.env.example
file to.env
file and fill in the values. - Set your development server ID and bot token in
.env
file. - Run
docker-compose up
to start the DB. - Run
npm run migrate
to create the tables. - Install the dependencies with
npm install
. - Run
npm run register-commands dev
to register the commands on your testing server. - Run
npm run dev
to start the bot.
After changing the prisma schema, create a migration using following command:
prisma migrate dev --name added_column
Whenever you make changes to your Prisma schema in the future, you manually need to invoke prisma generate
in order to accommodate the changes in your Prisma Client API.
Bot utilizes DeepL API for translating the Galnet articles. To get your API key, go to DeepL and create a developer account for free.
The translations are turned off in development
environment to save API quota. In order to turn on the translations, you need to set NODE_ENV=production
in .env
file.