Skip to content

Commit

Permalink
Merge pull request #12 from cloudmaker97/6-after-some-time-the-feed-i…
Browse files Browse the repository at this point in the history
…snt-in-sync-with-the-discord-embed
  • Loading branch information
cloudmaker97 authored Dec 1, 2024
2 parents e2da4df + 6bf6280 commit 4d97478
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 17 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,20 @@ services:
container_name: ls25bot
restart: always
volumes:
- ./config.json:/app/config.json
- ./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
2 changes: 1 addition & 1 deletion source/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4d97478

Please sign in to comment.