mirror of
https://github.com/cloudmaker97/FS25-Discord-Bot.git
synced 2025-12-06 00:18:34 +00:00
Merge pull request #12 from cloudmaker97/6-after-some-time-the-feed-isnt-in-sync-with-the-discord-embed
This commit is contained in:
commit
4d97478266
3 changed files with 19 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue