mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-14 19:56:29 +00:00
[AB-319] splitting emotes into two separate fields (animated and static) for server info
adding emote display model
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package dev.sheldan.abstracto.core.models.template.display;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.dv8tion.jda.api.entities.Emote;
|
||||
|
||||
@Getter
|
||||
@Builder
|
||||
@Setter
|
||||
|
||||
public class EmoteDisplay {
|
||||
private String markDown;
|
||||
private Long emoteId;
|
||||
private String emoteKey;
|
||||
private Boolean animated;
|
||||
private String imageUrl;
|
||||
|
||||
public static EmoteDisplay fromEmote(Emote emote) {
|
||||
return EmoteDisplay
|
||||
.builder()
|
||||
.emoteId(emote.getIdLong())
|
||||
.emoteKey(emote.getName())
|
||||
.animated(emote.isAnimated())
|
||||
.markDown(emote.getAsMention())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user