Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VC Activity command crash fix #300 #343

Merged
merged 29 commits into from
Jan 18, 2022
Merged
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8fbb2c2
Added: MAX_AGE_DURATION - This converts seconds to days (7) Being max…
Budbomber Jan 13, 2022
3e718a7
Added: MAX_AGE_DURATION_ONE_WEEK sets the duration the max duration i…
Budbomber Jan 14, 2022
903fcf6
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 14, 2022
2e97eda
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 14, 2022
ff8f11c
Added: MAX_AGE_DURATION_ONE_WEEK sets the duration the max duration i…
Budbomber Jan 14, 2022
0756745
Merge remote-tracking branch 'origin/develop' into develop
Budbomber Jan 14, 2022
9ccf518
Cleaned up code, Added MAX_USES_MAX VALUE, reformatted MAX_AGE_MAX_VA…
Budbomber Jan 14, 2022
4d015aa
Cleaned up code, Added MAX_VALUE_MAX_USES, reformatted MAX_VALUE_MAX_…
Budbomber Jan 14, 2022
93b9927
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 14, 2022
d760bc0
Taken into account, all the suggestions cleaned up code
Budbomber Jan 15, 2022
505da9b
Merge remote-tracking branch 'origin/develop' into develop
Budbomber Jan 15, 2022
2c7567c
Update VcActivityCommand.java
Budbomber Jan 15, 2022
f26b4f2
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 15, 2022
6f5cbbd
Update VcActivityCommand.java
Budbomber Jan 15, 2022
825ec48
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 15, 2022
5104e73
Update VcActivityCommand.java
Budbomber Jan 15, 2022
2ae2a87
Taken into account, all the suggestions cleaned up code
Budbomber Jan 15, 2022
b57c07b
Merge remote-tracking branch 'origin/develop' into develop
Budbomber Jan 15, 2022
f7d0640
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 15, 2022
a49095c
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 15, 2022
4ddbd6c
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 15, 2022
29d217f
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 15, 2022
a4ccedb
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 15, 2022
aeb8e79
Update application/src/main/java/org/togetherjava/tjbot/commands/basi…
Budbomber Jan 15, 2022
97ed98a
Made changes Zabu requested, typos, Moved declarations, updated doc, …
Budbomber Jan 17, 2022
0aca975
Final changes made, renamed handle method to RequiredOptionIfPresent,…
Budbomber Jan 17, 2022
c11b8ea
Changes made, remaned maxAge to maxAgeDays, added check in voicechane…
Budbomber Jan 17, 2022
19062bc
Fixed typo's changed text in options to reflect the values set in the…
Budbomber Jan 17, 2022
0a98196
Fixed value that was forgotten, input is now in days for UX, and the …
Budbomber Jan 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public final class VcActivityCommand extends SlashCommandAdapter {
private static final String MAX_USES_OPTION = "max-uses";
private static final String MAX_AGE_OPTION = "max-age";

private static final int MAX_VALUE_MAX_AGE = ChronoUnit.SECONDS.fromDays(7);

public static final String YOUTUBE_TOGETHER_NAME = "YouTube Together";
public static final String POKER_NAME = "Poker";
public static final String BETRAYAL_IO_NAME = "Betrayal.io";
Expand Down Expand Up @@ -86,8 +88,8 @@ public final class VcActivityCommand extends SlashCommandAdapter {
new OptionData(OptionType.STRING, MAX_USES_OPTION,
"The amount of times the invite can be used, default is infinity", false),
new OptionData(OptionType.INTEGER, MAX_AGE_OPTION,
"Max age in seconds. Set this to 0 to never expire, default is 1 day", false));

"Max age in seconds. Set this to 0 to never expire, default is 1 day", false)
.setRequiredRange(0, MAX_VALUE_MAX_AGE));

/**
* Constructs an instance
Expand Down