diff --git a/src/main/java/com/deahtstroke/rivenbot/enums/Raid.java b/src/main/java/com/deahtstroke/rivenbot/enums/Raid.java index 6b07391..866d227 100644 --- a/src/main/java/com/deahtstroke/rivenbot/enums/Raid.java +++ b/src/main/java/com/deahtstroke/rivenbot/enums/Raid.java @@ -12,13 +12,19 @@ public enum Raid { List.of( new SocialLink(SocialPlatform.DEVIANTART, "https://www.deviantart.com/a-phantom-moon"))), GARDEN_OF_SALVATION("Garden of Salvation", "garden_of_salvation", null, null), - DEEP_STONE_CRYPT("Deep Stone Crypt", "deep_stone_crypt", null, null), + DEEP_STONE_CRYPT("Deep Stone Crypt", "deep_stone_crypt", "a-phantom-moon", + List.of( + new SocialLink(SocialPlatform.DEVIANTART, "https://www.deviantart.com/a-phantom-moon"))), VAULT_OF_GLASS("Vault of Glass", "vault_of_glass", "SCA", List.of( new SocialLink(SocialPlatform.STEAM, "https://steamcommunity.com/id/scaro25"))), VOW_OF_THE_DISCIPLE("Vow of the Disciple", "vow_of_the_disciple", null, null), KINGS_FALL("King's Fall", "kings_fall", null, null), - ROOT_OF_NIGHTMARES("Root of Nightmares", "root_of_nightmares", null, null), + ROOT_OF_NIGHTMARES("Root of Nightmares", "root_of_nightmares", "Pyranie", + List.of( + new SocialLink(SocialPlatform.TWITTER, "https://twitter.com/pryanie"), + new SocialLink(SocialPlatform.REDDIT, "https://www.reddit.com/user/pryanie/")) + ), CROTAS_END("Crota's End", "crotas_end", null, null); @Getter diff --git a/src/main/java/com/deahtstroke/rivenbot/enums/RaidEncounter.java b/src/main/java/com/deahtstroke/rivenbot/enums/RaidEncounter.java index 1007ab6..7efb9b5 100644 --- a/src/main/java/com/deahtstroke/rivenbot/enums/RaidEncounter.java +++ b/src/main/java/com/deahtstroke/rivenbot/enums/RaidEncounter.java @@ -1,18 +1,16 @@ package com.deahtstroke.rivenbot.enums; -import lombok.Getter; -import reactor.core.publisher.Flux; - import java.util.Arrays; import java.util.List; import java.util.Objects; +import lombok.Getter; +import reactor.core.publisher.Flux; public enum RaidEncounter { // Root of Nightmares CATACLYSM(Raid.ROOT_OF_NIGHTMARES, "Cataclysm", "cataclysm"), SCISSION(Raid.ROOT_OF_NIGHTMARES, "Scission", "scission"), - CHASM(Raid.ROOT_OF_NIGHTMARES, "Chasm", "chasm"), ZO_AURC(Raid.ROOT_OF_NIGHTMARES, "Zo'Aurc, Explicator of Planets", "zoaurc"), NEZAREC(Raid.ROOT_OF_NIGHTMARES, "Nezarec, the Final God of Pain", "nezarec"), @@ -22,7 +20,6 @@ public enum RaidEncounter { MORGETH(Raid.LAST_WISH, "Morgeth, the Spirekeeper", "morgeth"), VAULT_SECURITY_MECHANISM(Raid.LAST_WISH, "Vault Security Mechanism", "vault_security"), RIVEN_OF_A_THOUSAND_VOICES(Raid.LAST_WISH, "Riven of a Thousand Voices", "riven"), - QUEENSWALK(Raid.LAST_WISH, "Queenswalk", "queenswalk"), // Garden of Salvation EMBRACE(Raid.GARDEN_OF_SALVATION, "Embrace", "embrace"), @@ -35,7 +32,8 @@ public enum RaidEncounter { CRYPT_SECURITY(Raid.DEEP_STONE_CRYPT, "Crypt Security", "crypt_security"), ATRAKS_1(Raid.DEEP_STONE_CRYPT, "Atraks-1", "atraks_1"), TANIKS_REBORN(Raid.DEEP_STONE_CRYPT, "Taniks-Reborn/Nuclear Descent", "taniks_reborn"), - TANIKS_THE_ABOMNITAION(Raid.DEEP_STONE_CRYPT, "Taniks, the Abomination", "taniks_the_abomination"), + TANIKS_THE_ABOMNITAION(Raid.DEEP_STONE_CRYPT, "Taniks, the Abomination", + "taniks_the_abomination"), // Vault of Glass CONFLUXES(Raid.VAULT_OF_GLASS, "Confluxes", "confluxes"), diff --git a/src/main/java/com/deahtstroke/rivenbot/enums/SocialPlatform.java b/src/main/java/com/deahtstroke/rivenbot/enums/SocialPlatform.java index fdd5cef..21ff158 100644 --- a/src/main/java/com/deahtstroke/rivenbot/enums/SocialPlatform.java +++ b/src/main/java/com/deahtstroke/rivenbot/enums/SocialPlatform.java @@ -5,7 +5,9 @@ public enum SocialPlatform { DEVIANTART("DeviantArt", ":deviantart:", 1240125288885784616L), - STEAM("Steam", ":steamlogo:", 1240514012215513139L); + STEAM("Steam", ":steamlogo:", 1240765704114798635L), + REDDIT("Reddit", "redditlogo", 1240767009910947861L), + TWITTER("Twitter/X", "xlogo", 1240767798792294503L); @Getter private final String platformName; diff --git a/src/main/java/com/deahtstroke/rivenbot/handler/RaidMapHandler.java b/src/main/java/com/deahtstroke/rivenbot/handler/RaidMapHandler.java index dedec6d..99cc9f7 100644 --- a/src/main/java/com/deahtstroke/rivenbot/handler/RaidMapHandler.java +++ b/src/main/java/com/deahtstroke/rivenbot/handler/RaidMapHandler.java @@ -23,6 +23,7 @@ import java.util.Map; import java.util.Objects; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.core.io.Resource; import org.springframework.util.Assert; import reactor.core.publisher.Flux; @@ -63,6 +64,23 @@ private static InteractionResponse formatInteractionResponse( RaidEncounter raidEncounter = RaidEncounter.findEncounter(raid, encounterDirectory); + List socials; + if (CollectionUtils.isNotEmpty(raid.getArtistSocials())) { + socials = raid.getArtistSocials().stream() + .map(socialLink -> Component.builder() + .type(2) + .style(5) + .url(socialLink.getSocialLink()) + .label(SOCIAL_LINK_LABEL_FORMAT.formatted(raid.getArtistName(), + socialLink.getSocialPlatform().getPlatformName())) + .emoji(new Emoji(socialLink.getSocialPlatform().getEmojiId(), + socialLink.getSocialPlatform().getEmojiName(), false)) + .build()) + .toList(); + } else { + socials = null; + } + List embeds = attachments.stream() .map(attachment -> Embedded.builder() .title(EMBED_TITLE.formatted(raid.getRaidName(), raidEncounter.getName())) @@ -79,17 +97,7 @@ private static InteractionResponse formatInteractionResponse( InteractionResponseData data = InteractionResponseData.builder() .components(List.of(Component.builder() .type(1) - .components(raid.getArtistSocials().stream() - .map(socialLink -> Component.builder() - .type(2) - .style(5) - .url(socialLink.getSocialLink()) - .label(SOCIAL_LINK_LABEL_FORMAT.formatted(raid.getArtistName(), - socialLink.getSocialPlatform().getPlatformName())) - .emoji(new Emoji(socialLink.getSocialPlatform().getEmojiId(), - socialLink.getSocialPlatform().getEmojiName(), false)) - .build()) - .toList()) + .components(socials) .build())) .attachments(attachments) .embeds(embeds) diff --git a/src/main/resources/static/raids/deep_stone_crypt/taniks_the_abonimation/taniks-last-encounter.jpg b/src/main/resources/static/raids/deep_stone_crypt/taniks_the_abomination/taniks-last-encounter.jpg similarity index 100% rename from src/main/resources/static/raids/deep_stone_crypt/taniks_the_abonimation/taniks-last-encounter.jpg rename to src/main/resources/static/raids/deep_stone_crypt/taniks_the_abomination/taniks-last-encounter.jpg diff --git a/src/main/resources/static/raids/root_of_nightmares/cataclysm/cataclysm.jpeg b/src/main/resources/static/raids/root_of_nightmares/cataclysm/cataclysm.jpeg new file mode 100644 index 0000000..3f207d6 Binary files /dev/null and b/src/main/resources/static/raids/root_of_nightmares/cataclysm/cataclysm.jpeg differ diff --git a/src/main/resources/static/raids/root_of_nightmares/nezarec/nezarec.jpeg b/src/main/resources/static/raids/root_of_nightmares/nezarec/nezarec.jpeg new file mode 100644 index 0000000..f8f32f6 Binary files /dev/null and b/src/main/resources/static/raids/root_of_nightmares/nezarec/nezarec.jpeg differ diff --git a/src/main/resources/static/raids/root_of_nightmares/scission/scission.jpeg b/src/main/resources/static/raids/root_of_nightmares/scission/scission.jpeg new file mode 100644 index 0000000..8b2923d Binary files /dev/null and b/src/main/resources/static/raids/root_of_nightmares/scission/scission.jpeg differ diff --git a/src/main/resources/static/raids/root_of_nightmares/zoaurc/expliactor.jpeg b/src/main/resources/static/raids/root_of_nightmares/zoaurc/expliactor.jpeg new file mode 100644 index 0000000..f5f6536 Binary files /dev/null and b/src/main/resources/static/raids/root_of_nightmares/zoaurc/expliactor.jpeg differ