Merge pull request #12 from cloudmaker97/6-after-some-time-the-feed-isnt-in-sync-with-the-discord-embed

This commit is contained in:
Dennis Heinrich 2024-12-01 12:06:55 +01:00 committed by GitHub
commit 4d97478266
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 3 deletions

View file

@ -69,7 +69,7 @@ discord.js library to interact with Discord and fetches server stats via the XML
## Running the Bot
### Option 1: Run Inside a Docker Container
### Option 1: Run Inside a Docker Container (Recommended)
1. Navigate to the root directory of the cloned repository.
2. Build and start the container:

View file

@ -9,3 +9,19 @@ services:
restart: always
volumes:
- ./config.json:/app/config.json
restart:
image: docker:cli
restart: unless-stopped
container_name: ls25bot-restart
volumes:
- /var/run/docker.sock:/var/run/docker.sock
entrypoint: [ "/bin/sh","-c" ]
command:
- |
echo "Restarting ls25bot container is running"
while true; do
sleep 7200 # Each 2 hours
echo "Restarting ls25bot container at $(date)"
docker restart ls25bot
done

View file

@ -38,7 +38,7 @@ discordClient.login(appConfig.discord.botToken).then(() => {
/**
* Start the DiscordService and restart it if an error occurred
*/
function startDiscordService(): void {
async function startDiscordService(): Promise<void> {
try {
new DiscordService(discordClient);
} catch (exception) {