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

Punishment Service implemented. Hooray. #8

Merged
merged 4 commits into from Sep 7, 2019

Conversation

@Lamphobic
Copy link
Owner

commented Sep 6, 2019

PunishmentEntry made and is appropriately setup for ebeans and guice. PunishmentService made and setup for ebeans and guice. Logic migrated from BotService to appropriate locations. Punishment removed.

@Lamphobic Lamphobic requested a review from MatthewMerrill Sep 6, 2019

@MatthewMerrill

This comment has been minimized.

Copy link
Collaborator

commented Sep 6, 2019

@Lamphobic Lamphobic requested a review from MatthewMerrill Sep 6, 2019

Lamphobic added 2 commits Sep 6, 2019
Instant now = Instant.now();
Duration timePassed = Duration.between(punishmentStart, now);
long secondsPassed = timePassed.getSeconds();
return (int) secondsPassed / PunishmentService.getDecaySeconds();
}

public String getHumanTimeRemaining() {

This comment has been minimized.

Copy link
@MatthewMerrill

MatthewMerrill Sep 7, 2019

Collaborator

nit: is it possible to do this with SimpleDateFormat or something? Maybe just add // TODO: replace with date formatter

This comment has been minimized.

Copy link
@Lamphobic

Lamphobic Sep 7, 2019

Author Owner

Timezones.

This comment has been minimized.

Copy link
@Lamphobic

Lamphobic Sep 7, 2019

Author Owner

I considered at one point using DateTime at GMT+0 as my core storage solution and returning an end-time at GMT+0, but decided this was better. If you want to argue for it though, go ahead.

@Lamphobic Lamphobic merged commit 54c79aa into master Sep 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.