Skip to content

Commit

Permalink
fix : new Line to Those who do not meet working hours
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonSangWon committed Oct 23, 2023
1 parent a57c922 commit 6580a81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ dependencies {
implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
implementation group: 'net.dv8tion', name: 'JDA', version: '5.0.0-beta.5'
implementation group: 'org.hibernate.validator', name: 'hibernate-validator', version: '8.0.0.Final'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.26'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.26'
testAnnotationProcessor('org.projectlombok:lombok')
annotationProcessor('org.projectlombok:lombok')
testImplementation 'org.springframework.boot:spring-boot-starter-test'
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/mega/waka/discord/DiscordListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public DiscordListener(MemberRepository memberRepository) {
@Override
public void onSlashCommandInteraction(SlashCommandInteractionEvent event) { //test->1116650046797135992, 1090659127417638943
try{
if(!event.getChannel().getId().equals("1116650046797135992")) return;
if(!event.getChannel().getId().equals("1090659127417638943")) return;
super.onSlashCommandInteraction(event);

User user = event.getUser();
Expand Down Expand Up @@ -159,11 +159,11 @@ public StringBuilder returnToOverallRanking(List<Map.Entry<String,Integer>> sort
if (totalMinutes > 0) {
message.append((i + 1) + " 등 - " + sortedList.get(i).getKey() + "\n -> " + hours + "시간 " + minutes + "분\n");
} else {
++cnt;
if(cnt==1) message.append("****** 근무시간 미달자 ******");
message.append((i + 1) + " 등 - " + sortedList.get(i).getKey() + "\n -> 0시간 0분\n");
}
} else {
++cnt;
if(cnt==1) message.append("****** 근무시간 미달자 ******");
message.append((i + 1) + " 등 - " + sortedList.get(i).getKey() + "\n -> " + hours + "시간 " + minutes + "분\n");
}
}
Expand Down

0 comments on commit 6580a81

Please sign in to comment.