diff --git a/API/pom.xml b/API/pom.xml index 1c32460..1d9bac2 100644 --- a/API/pom.xml +++ b/API/pom.xml @@ -105,7 +105,6 @@ compile - io.sentry diff --git a/API/src/main/java/me/braydon/tether/model/user/CustomStatus.java b/API/src/main/java/me/braydon/tether/model/user/CustomStatus.java index 2838a56..98d66ae 100644 --- a/API/src/main/java/me/braydon/tether/model/user/CustomStatus.java +++ b/API/src/main/java/me/braydon/tether/model/user/CustomStatus.java @@ -5,6 +5,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NonNull; import net.dv8tion.jda.api.entities.Activity; +import net.dv8tion.jda.api.entities.emoji.CustomEmoji; import net.dv8tion.jda.api.entities.emoji.EmojiUnion; import java.util.List; @@ -38,7 +39,13 @@ public class CustomStatus { continue; } EmojiUnion emoji = activity.getEmoji(); - return new CustomStatus(activity.getName(), emoji == null ? null : emoji.asUnicode().getFormatted()); + String emojiString = null; + if (emoji instanceof CustomEmoji customEmoji) { + emojiString = customEmoji.getImageUrl(); + } else if (emoji != null) { + emojiString = emoji.asUnicode().getFormatted(); + } + return new CustomStatus(activity.getName(), emojiString); } return null; }