-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/experimental-raid-stats-no-authe…
…ntication' into fix-signature-filter # Conflicts: # src/main/java/com/danielvm/destiny2bot/filter/RequestBodyCacheFilter.java # src/test/java/com/danielvm/destiny2bot/factory/ApplicationCommandFactoryTest.java # src/test/java/com/danielvm/destiny2bot/integration/BaseIntegrationTest.java
- Loading branch information
Showing
40 changed files
with
570 additions
and
578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
src/main/java/com/danielvm/destiny2bot/controller/TestController.java
This file was deleted.
Oops, something went wrong.
91 changes: 0 additions & 91 deletions
91
src/main/java/com/danielvm/destiny2bot/dto/destiny/CharacterRaidStatistics.java
This file was deleted.
Oops, something went wrong.
88 changes: 88 additions & 0 deletions
88
src/main/java/com/danielvm/destiny2bot/dto/destiny/RaidStatistics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package com.danielvm.destiny2bot.dto.destiny; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class RaidStatistics { | ||
|
||
/** | ||
* The name of the raid | ||
*/ | ||
private String raidName; | ||
|
||
/** | ||
* Total amount of kills done for a raid | ||
*/ | ||
private Integer totalKills; | ||
|
||
/** | ||
* Total amount of deaths done in a raid | ||
*/ | ||
private Integer totalDeaths; | ||
|
||
/** | ||
* The fastest time a player has done in a raid | ||
*/ | ||
private Integer fastestTime; | ||
|
||
/** | ||
* The average time a player finishes the raid | ||
*/ | ||
private Integer averageTime; | ||
|
||
/** | ||
* The number of completed raids that user has for a specific raid | ||
*/ | ||
private Integer partialClears; | ||
|
||
/** | ||
* The total amount of times a player has played this raid | ||
*/ | ||
private Integer totalClears; | ||
|
||
/** | ||
* The total amount of full clears for a raid | ||
*/ | ||
private Integer fullClears; | ||
|
||
public RaidStatistics(String raidName) { | ||
this.raidName = raidName; | ||
this.totalKills = 0; | ||
this.totalDeaths = 0; | ||
this.fastestTime = Integer.MAX_VALUE; | ||
this.averageTime = 0; | ||
this.partialClears = 0; | ||
this.totalClears = 0; | ||
this.fullClears = 0; | ||
} | ||
|
||
public String toString() { | ||
StringBuilder fastestRaidDuration = new StringBuilder(); | ||
int hours = (fastestTime / 3600) % 24; | ||
int minutes = (fastestTime / 60) % 60; | ||
if (hours > 0) { | ||
fastestRaidDuration.append(hours).append("hr(s)").append(" "); | ||
} | ||
if (minutes > 0) { | ||
fastestRaidDuration.append(minutes).append("mins"); | ||
} | ||
StringBuilder raidTemplate = new StringBuilder(); | ||
raidTemplate.append(":crossed_swords: ").append("Kills: ").append(this.totalKills) | ||
.append("\n"); | ||
raidTemplate.append(":skull_crossbones: ").append("Deaths: ").append(this.totalDeaths) | ||
.append("\n"); | ||
if (!fastestRaidDuration.isEmpty()) { | ||
raidTemplate.append(":first_place: ").append("Fastest: ").append(fastestRaidDuration) | ||
.append("\n"); | ||
} | ||
raidTemplate.append(":bar_chart: ").append("Total Clears: ").append(this.totalClears) | ||
.append("\n"); | ||
raidTemplate.append(":trophy: ").append("Full Clears: ").append(this.fullClears) | ||
.append("\n"); | ||
return raidTemplate.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/com/danielvm/destiny2bot/dto/discord/EmbeddedProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.danielvm.destiny2bot.dto.discord; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder | ||
public class EmbeddedProvider { | ||
|
||
private String name; | ||
|
||
private String url; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.