Added demo configuration for en/ger language

This commit is contained in:
Dennis Heinrich 2024-11-26 10:44:34 +01:00
parent df2e35df0f
commit 32aae35ed3
7 changed files with 44 additions and 3 deletions

View file

@ -9,7 +9,7 @@ RUN npm install
RUN npm run build RUN npm run build
## Simplyfy the rm commands ## Simplyfy the rm commands
RUN rm -rf .ddev/ source/ misc/ .git .gitignore config.example.json Dockerfile docker-compose.yml README.md RUN rm -rf .ddev/ source/ misc/ .git .gitignore config.example-en.json Dockerfile docker-compose.yml README.md
CMD ["npm", "run", "start-only"] CMD ["npm", "run", "start-only"]
ENTRYPOINT ["npm", "run", "start-only"] ENTRYPOINT ["npm", "run", "start-only"]

View file

@ -4,7 +4,7 @@ This bot will post the server stats of a Farming Simulator 25 server to a Discor
name, server password, server time, and the player count. The bot will update the server stats every x seconds ( name, server password, server time, and the player count. The bot will update the server stats every x seconds (
configurable). configurable).
![discord_embed.png](misc%2Fimages%2Fdiscord_embed.png) ![discord_embed.png](misc%2Fimages%2Fdiscord_en.png)
The bot is written in Node.js and uses the [discord.js](https://discord.js.org/) library to interact with the Discord The bot is written in Node.js and uses the [discord.js](https://discord.js.org/) library to interact with the Discord
API. It API. It
@ -36,7 +36,7 @@ interface of the server).
## Configure the bot ## Configure the bot
1. Clone the repository to your server 1. Clone the repository to your server
2. Move the `config.example.json` to `config.json` 2. Move the `config.example-de.json` or `config.example-en.json` to `config.json` (depending on your language)
3. Fill in the required fields in the `config.json` file, do not delete fields, just leave them empty for default values 3. Fill in the required fields in the `config.json` file, do not delete fields, just leave them empty for default values
4. All fields with a `(*)` are required fields for the bot to work. The other fields are optional and can be left by 4. All fields with a `(*)` are required fields for the bot to work. The other fields are optional and can be left by
default default

41
config.example-de.json Normal file
View file

@ -0,0 +1,41 @@
{
"application": {
"serverPassword": "TypeMyServerPasswordHere",
"serverStatsUrl": "http://1.1.1.1:8080/feed/dedicated-server-stats.xml",
"serverMapUrl": "http://1.1.1.1:8080/feed/dedicated-server-stats-map.jpg",
"updateIntervalSeconds": 30
},
"discord": {
"channelId": "DiscordChannelId_12345",
"botToken": "DiscordSecretBotToken_XYZ"
},
"translation": {
"discordEmbed": {
"title": "LS25 Server Status",
"descriptionOnline": "Der Server ist online",
"descriptionOffline": "Der Server ist offline",
"descriptionUnknown": "Serverdaten werden abgerufen",
"titleServerName": "Server-Name:",
"titleServerMap": "Server-Karte:",
"titleServerMods": "Server-Mods:",
"titleServerPassword": "Server-Passwort:",
"titleServerTime": "Server-Zeit:",
"titlePlayerCount": "Spieler online:",
"noPlayersOnline": "Keine Spieler online"
},
"common": {
"monthJanuary": "Januar",
"monthFebruary": "Februar",
"monthMarch": "März",
"monthApril": "April",
"monthMay": "Mai",
"monthJune": "Juni",
"monthJuly": "Juli",
"monthAugust": "August",
"monthSeptember": "September",
"monthOctober": "Oktober",
"monthNovember": "November",
"monthDecember": "Dezember"
}
}
}

BIN
misc/images/discord_de.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

BIN
misc/images/discord_en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB