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
/subscribecommand, and choose your preferred language and channel - Enjoy!
- To stop the bot from sending messages use the
/unsubscribecommand
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.examplefile to.envfile and fill in the values. - Set your development server ID and bot token in
.envfile. - Run
docker-compose upto start the DB. - Run
npm run migrateto create the tables. - Install the dependencies with
npm install. - Run
npm run register-commands devto register the commands on your testing server. - Run
npm run devto 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.
