Skip to content

Commit

Permalink
Added the Reload Listener to the Discord Bot
Browse files Browse the repository at this point in the history
  • Loading branch information
beanbeanjuice committed Jun 19, 2024
1 parent 91ebcba commit f6699ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@
# True if you will be using Discord. The reload command does not work with this.
use-discord: false

# Discord Bot Token (IGNORE IF use_discord = false). The reload command does not work with this.
# Discord Bot Token (IGNORE IF use_discord = false).
BOT-TOKEN: "TOKEN_HERE"

# Channel to send Discord messages to (IGNORE IF use_discord = false). The reload command does not work with this.
# Channel to send Discord messages to (IGNORE IF use_discord = false).
CHANNEL-ID: "GLOBAL_CHANNEL_ID"

bot-activity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public Bot(final Config config, final Consumer<String> errorLogger) {
bot = null;
return;
}

config.addReloadListener(this::updateActivity);
config.addReloadListener(this::updateStatus);
}

public void sendMessage(final String messageToSend) {
Expand Down
4 changes: 2 additions & 2 deletions projects/main-app/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# True if you will be using Discord. The reload command does not work with this.
use-discord: false

# Discord Bot Token (IGNORE IF use_discord = false). The reload command does not work with this.
# Discord Bot Token (IGNORE IF use_discord = false).
BOT-TOKEN: "TOKEN_HERE"

# Channel to send Discord messages to (IGNORE IF use_discord = false). The reload command does not work with this.
# Channel to send Discord messages to (IGNORE IF use_discord = false).
CHANNEL-ID: "GLOBAL_CHANNEL_ID"

bot-activity:
Expand Down

0 comments on commit f6699ad

Please sign in to comment.