Skip to content

Commit 4d97478

Browse files
authored
Merge pull request #12 from cloudmaker97/6-after-some-time-the-feed-isnt-in-sync-with-the-discord-embed
2 parents e2da4df + 6bf6280 commit 4d97478

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ discord.js library to interact with Discord and fetches server stats via the XML
6969

7070
## Running the Bot
7171

72-
### Option 1: Run Inside a Docker Container
72+
### Option 1: Run Inside a Docker Container (Recommended)
7373

7474
1. Navigate to the root directory of the cloned repository.
7575
2. Build and start the container:

docker-compose.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,20 @@ services:
88
container_name: ls25bot
99
restart: always
1010
volumes:
11-
- ./config.json:/app/config.json
11+
- ./config.json:/app/config.json
12+
13+
restart:
14+
image: docker:cli
15+
restart: unless-stopped
16+
container_name: ls25bot-restart
17+
volumes:
18+
- /var/run/docker.sock:/var/run/docker.sock
19+
entrypoint: [ "/bin/sh","-c" ]
20+
command:
21+
- |
22+
echo "Restarting ls25bot container is running"
23+
while true; do
24+
sleep 7200 # Each 2 hours
25+
echo "Restarting ls25bot container at $(date)"
26+
docker restart ls25bot
27+
done

source/Main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ discordClient.login(appConfig.discord.botToken).then(() => {
3838
/**
3939
* Start the DiscordService and restart it if an error occurred
4040
*/
41-
function startDiscordService(): void {
41+
async function startDiscordService(): Promise<void> {
4242
try {
4343
new DiscordService(discordClient);
4444
} catch (exception) {

0 commit comments

Comments
 (0)