Skip to content

Commit

Permalink
add command to configure file.io replay upload
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Dec 17, 2024
1 parent ac897a5 commit 6d083f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/com/zenith/command/impl/ReplayCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public CommandUsage commandUsage() {
Replays can optionally be uploaded to discord if they are under the discord message size limit.
If a replay is too large for discord, it can be uploaded to https://file.io instead if `fileIoUpload` is enabled.
A `maxRecordingTime` of 0 means there is no limit, however, recording are always stopped on disconnects.
`autoStart` will automatically start a new recording when the proxy connects.
Expand All @@ -42,6 +44,7 @@ public CommandUsage commandUsage() {
"start",
"stop",
"discordUpload on/off",
"fileIoUpload on/off",
"maxRecordingTime <minutes>",
"autoRecord mode <off/proxyConnected/playerConnected/health>",
"autoRecord health <integer>"
Expand Down Expand Up @@ -84,6 +87,12 @@ public LiteralArgumentBuilder<CommandContext> register() {
.title("Discord Upload " + toggleStrCaps(CONFIG.client.extra.replayMod.sendRecordingsToDiscord));
return 1;
})))
.then(literal("fileIoUploadIfTooLarge").requires(Command::validateAccountOwner).then(argument("toggle", toggle()).executes(c -> {
CONFIG.client.extra.replayMod.fileIOUploadIfTooLarge = getToggle(c, "toggle");
c.getSource().getEmbed()
.title("file.io Upload " + toggleStrCaps(CONFIG.client.extra.replayMod.fileIOUploadIfTooLarge));
return 1;
})))
.then(literal("maxRecordingTime").then(argument("minutes", integer(0, 60 * 6)).executes(c -> {
CONFIG.client.extra.replayMod.maxRecordingTimeMins = getInteger(c, "minutes");
c.getSource().getEmbed()
Expand Down Expand Up @@ -122,6 +131,7 @@ public void postPopulate(final Embed embed) {
embed
.primaryColor()
.addField("Discord Upload", toggleStr(CONFIG.client.extra.replayMod.sendRecordingsToDiscord), false)
.addField("file.io Upload", toggleStr(CONFIG.client.extra.replayMod.fileIOUploadIfTooLarge), false)
.addField("Max Recording Time", getMaxRecordingTimeStr(), false)
.addField("Auto Record Mode", CONFIG.client.extra.replayMod.autoRecordMode.getName(), false);
}
Expand Down

0 comments on commit 6d083f0

Please sign in to comment.