[AB-170] adding emote stat command for single emote

fixing naming of fields in show tracked emotes
This commit is contained in:
Sheldan
2021-10-27 00:25:10 +02:00
parent c7076795a2
commit cef46737c5
13 changed files with 207 additions and 47 deletions

View File

@@ -2,6 +2,7 @@ package dev.sheldan.abstracto.statistic.emote.service;
import dev.sheldan.abstracto.core.models.database.AServer;
import dev.sheldan.abstracto.statistic.emote.model.EmoteStatsModel;
import dev.sheldan.abstracto.statistic.emote.model.EmoteStatsResultDisplay;
import dev.sheldan.abstracto.statistic.emote.model.database.TrackedEmote;
import java.time.Instant;
@@ -46,6 +47,7 @@ public interface UsedEmoteService {
* @return An {@link EmoteStatsModel} containing the statistics split by animated and static {@link net.dv8tion.jda.api.entities.Emote}
*/
EmoteStatsModel getActiveEmoteStatsForServerSince(AServer server, Instant since);
EmoteStatsResultDisplay getEmoteStatForEmote(TrackedEmote trackedEmote, Instant since);
/**
* Removes all {@link dev.sheldan.abstracto.statistic.emote.model.database.UsedEmote} for the given {@link TrackedEmote} which are younger

View File

@@ -77,6 +77,7 @@ public interface UsedEmoteManagementService {
* @return A list of {@link EmoteStatsResult} from the {@link AServer} newer than the given {@link Instant} for all active {@link TrackedEmote}
*/
List<EmoteStatsResult> loadActiveEmoteStatsForServerSince(AServer server, Instant since);
EmoteStatsResult loadEmoteStatForEmote(TrackedEmote trackedEmote, Instant since);
/**
* Deletes all emote usages for the {@link TrackedEmote} which are younger than the given {@link Instant}