-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Conversation
…imum. Added: .setRequiredRange(1, TimeUnit.DAYS.toSeconds(MAX_AGE_DURATION))); sets required range between 1 and 7 days.
…n seconds. Added to option MAX_AGE_OPTION: .setRequiredRange(1,NAX_DURATION_ONE_WEEK)); sets required range between 1 and 7 days in seconds
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
…c/VcActivityCommand.java Changed, MAX_DURATION_ONE_WEEK to more readable, MAX_VALUE_MAX_AGE, and used ChronoUnit to convert seconds to days. Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
Apart from what has been mentioned, looks fine. That said, what about the rest of the code? If I remember correctly, it had some check ( Please double check and if necessary clean up, thanks. |
…c/VcActivityCommand.java More readable, removed irrelevant comment Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More readable following changes, accepted suggested.
This would also mean changing max users to the same effect as age, and removing that handler totally, (I think) |
I see that there also is a max to the max-uses option, see the Discord docs here Has to be between 0 and 100, fix that too in this PR? That way the handleIntegerTypeOption's validation regarding it being a valid Integer can be removed |
No worries, I'll work on that now and clean up it up |
…n seconds. Added to option MAX_AGE_OPTION: .setRequiredRange(1,NAX_DURATION_ONE_WEEK)); sets required range between 1 and 7 days in seconds
# Conflicts: # application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
…LUE to more readable TimeUnit
…AGE to more readable TimeUnit.
Seems to be working now, changes made, any input appreciated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
…c/VcActivityCommand.java wrong values (oops) Co-authored-by: Jonas <jnhrd254@gmail.com>
…c/VcActivityCommand.java Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…c/VcActivityCommand.java Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…c/VcActivityCommand.java Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…c/VcActivityCommand.java Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…c/VcActivityCommand.java Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
…c/VcActivityCommand.java Co-authored-by: Tais993 <49957334+Tais993@users.noreply.github.com>
Yeah sorry bud must of been the merges etc I failed haha next PR I will do much neater haha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this as Tijs has also approved it.
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
@Budbomber Please dont resolve conversations yourself. Let them open and wait until the person who requested change approves and closes them, thanks. |
…removed some more empty lines etc.
Head branch was pushed to by a user without write access
… doc updated. other format changes.
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
…l createInvite for maxAgeDays if null default set otherwise user input set.
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/commands/basic/VcActivityCommand.java
Outdated
Show resolved
Hide resolved
… MAX_AGE_LIMIT & MAX_USES_LIMIT
…text will display correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set a max duration of a week in seconds, (Not sure what the best way to do it was, so went with a 606024) 7 days in seconds.
Added required range to MAX_AGE_OPTION (0, MAX_AGE_DURATION_ONE_WEEK).