Skip to content

Commit

Permalink
重命名 status -> activity
Browse files Browse the repository at this point in the history
Relates to #95
  • Loading branch information
Xujiayao committed Jul 4, 2024
1 parent 8ac3ddb commit 7b9d9f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/xujiayao/discord_mc_chat/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public static class Generic {
public String language = "en_us";

public String botToken = "";
public String botPlayingStatus = "Minecraft (%onlinePlayerCount%/%maxPlayerCount%)";
public String botListeningStatus = "";
public String botPlayingActivity = "Minecraft (%onlinePlayerCount%/%maxPlayerCount%)";
public String botListeningActivity = "";

public boolean useWebhook = true;

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/xujiayao/discord_mc_chat/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,12 @@ public static void setBotActivity() {
// Bot is registered before official server start
return;
}
if (!CONFIG.generic.botPlayingStatus.isEmpty()) {
JDA.getPresence().setActivity(Activity.playing(CONFIG.generic.botPlayingStatus
if (!CONFIG.generic.botPlayingActivity.isEmpty()) {
JDA.getPresence().setActivity(Activity.playing(CONFIG.generic.botPlayingActivity
.replace("%onlinePlayerCount%", Integer.toString(SERVER.getPlayerCount()))
.replace("%maxPlayerCount%", Integer.toString(SERVER.getMaxPlayers()))));
} else if (!CONFIG.generic.botListeningStatus.isEmpty()) {
JDA.getPresence().setActivity(Activity.listening(CONFIG.generic.botListeningStatus
} else if (!CONFIG.generic.botListeningActivity.isEmpty()) {
JDA.getPresence().setActivity(Activity.listening(CONFIG.generic.botListeningActivity
.replace("%onlinePlayerCount%", Integer.toString(SERVER.getPlayerCount()))
.replace("%maxPlayerCount%", Integer.toString(SERVER.getMaxPlayers()))));
} else {
Expand Down

0 comments on commit 7b9d9f7

Please sign in to comment.