Class GuildStats
java.lang.Object
dev.jacrispys.JavaBot.api.analytics.objects.GuildStats
- All Implemented Interfaces:
AudioAnalytics,AudioGuildAnalytics,GeneralGuildAnalytics,Stats
- Direct Known Subclasses:
GuildAnalytics
public abstract class GuildStats
extends Object
implements Stats, GeneralGuildAnalytics, AudioGuildAnalytics
Abstraction for
uses implementations of
GuildAnalytics to inherit
uses implementations of
Stats, GeneralGuildAnalytics, and AudioGuildAnalytics-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGuildStats(long guildId, AgentApi api, net.dv8tion.jda.api.JDA jda) -
Method Summary
Modifier and TypeMethodDescription<T extends net.dv8tion.jda.api.entities.UserSnowflake>
AudioUsergetAudioUser(T user) getGuildUser(net.dv8tion.jda.api.entities.User user) longnet.dv8tion.jda.api.entities.GuildlonglonggetPlaylistPlays(GuildPlaylistImpl playlist) longgetPlays()getRegularUsers(int frequency) longlong
-
Field Details
-
guildId
public final long guildId -
api
-
jda
public final net.dv8tion.jda.api.JDA jda -
sqlStats
-
-
Constructor Details
-
GuildStats
-
-
Method Details
-
getPlays
- Specified by:
getPlaysin interfaceAudioAnalytics- Returns:
- the total number of songs played in a guild.
- Throws:
SQLException
-
getPauses
- Specified by:
getPausesin interfaceAudioAnalytics- Returns:
- the amount of times the bot has been paused in a guild.
- Throws:
SQLException
-
getTotalPlaytime
- Specified by:
getTotalPlaytimein interfaceAudioAnalytics- Returns:
- the amount of time the bot has played songs in a guild.
- Throws:
SQLException
-
getTopListeners
- Specified by:
getTopListenersin interfaceAudioAnalytics- Returns:
- a list of the most active music listeners
-
getTopSongs
- Specified by:
getTopSongsin interfaceAudioAnalytics- Returns:
- a list of tracks that have been played the most in a guild
-
getAudioUser
- Specified by:
getAudioUserin interfaceAudioAnalytics- Type Parameters:
T- generic to allow members and users- Parameters:
user- is the JDA instance of the user- Returns:
- custom object for
AudioUser
-
getHijackCount
- Specified by:
getHijackCountin interfaceAudioAnalytics- Returns:
- the amount of times this guild has been hijacked
- Throws:
SQLException
-
getGuildPlaylists
- Specified by:
getGuildPlaylistsin interfaceAudioGuildAnalytics- Returns:
- custom
GuildPlaylistImplobject
-
getPlaylistPlays
- Specified by:
getPlaylistPlaysin interfaceAudioGuildAnalytics- Parameters:
playlist- to retrieve plays from- Returns:
- a value from the DB of how many plays a guild playlist has
-
getBookmarks
- Specified by:
getBookmarksin interfaceAudioGuildAnalytics- Returns:
- a list of
GuildBookmark
-
getJoinDate
- Specified by:
getJoinDatein interfaceGeneralGuildAnalytics- Returns:
- the JDA date/time the bot joined a given guild.
-
getBotUsers
- Specified by:
getBotUsersin interfaceGeneralGuildAnalytics- Returns:
- a list of
GuildUserthat are bot accounts
-
getRegularUsers
- Specified by:
getRegularUsersin interfaceGeneralGuildAnalytics- Parameters:
frequency- is a custom scalar for how often users access the bot (scale of 1-100)- Returns:
- a list of users above the
frequencyrequested.
-
getOverallStats
- Specified by:
getOverallStatsin interfaceGeneralGuildAnalytics- Returns:
- instance of
GuildStats
-
getTotalUses
- Specified by:
getTotalUsesin interfaceStats- Returns:
- total times any command has been used
- Throws:
SQLException- if a database error occurs
-
getGuildUser
- Specified by:
getGuildUserin interfaceGeneralGuildAnalytics- Parameters:
user- to find theGuildUserfor.- Returns:
- a
GuildUserinstance of the JDAUser
-
getParentGuild
public net.dv8tion.jda.api.entities.Guild getParentGuild()- Specified by:
getParentGuildin interfaceGeneralGuildAnalytics- Returns:
- an instance of the guild the constructor uses
-