Skip to content

Commit

Permalink
Fixed issue with properties not working. This will fix playEntranceOn…
Browse files Browse the repository at this point in the history
…Move and playEntranceOnJoin issues.
  • Loading branch information
Darkside138 committed Mar 26, 2022
1 parent 78ddace commit 89d7bea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ public SoundPlayerImpl(MainWatch mainWatch, SoundFileRepository soundFileReposit

private void init() {
loadProperties();

leaveAfterPlayback = Boolean.parseBoolean(appProperties.getProperty("leaveAfterPlayback"));
playEntranceOnJoin = Boolean.parseBoolean(appProperties.getProperty("playEntranceOnJoin"));
playEntranceOnMove = Boolean.parseBoolean(appProperties.getProperty("playEntranceOnMove"));

initializeDiscordBot();
if (bot == null) {
shutdownManager.initiateShutdown(0);
Expand All @@ -102,10 +107,6 @@ private void init() {
musicPlayer.setVolume(75);
trackScheduler = new TrackScheduler(musicPlayer);

leaveAfterPlayback = Boolean.parseBoolean(appProperties.getProperty("leaveAfterPlayback"));
playEntranceOnJoin = Boolean.parseBoolean(appProperties.getProperty("playEntranceOnJoin"));
playEntranceOnMove = Boolean.parseBoolean(appProperties.getProperty("playEntranceOnMove"));

ConnectorNativeLibLoader.loadConnectorLibrary();

initialized = true;
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/application.properties.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ respond_to_dm=true
command_character=?
leave_suffix=_leave

playEntranceOnMove=true
playEntranceOnJoin=true
leaveAfterPlayback=false

#Do not set this higher than 2000. This is a limit imposed by Discord and messages will fail if larger than 2000 characters
message_size_limit=2000

Expand Down

0 comments on commit 89d7bea

Please sign in to comment.