Record Class BotListData
java.lang.Object
java.lang.Record
de.chojo.jdautil.botlist.BotListData
- Record Components:
guilds- guild countuser- user countshardId- id of the shard, or -1 for the whole botshardCount- total number of shards
Statistics sent to a bot list, either for the whole bot or for a single shard.
-
Constructor Summary
ConstructorsConstructorDescriptionBotListData(long guilds, long user, int shardId, int shardCount) Creates an instance of aBotListDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longguilds()Returns the value of theguildsrecord component.final inthashCode()Returns a hash code value for this object.booleanisShard()Whether these statistics belong to a single shard.intReturns the value of theshardCountrecord component.intshardId()Returns the value of theshardIdrecord component.static List<BotListData> shards(ShardManager shardManager) Statistics per shard, taken from the caches of each running shard.final StringtoString()Returns a string representation of this record class.static BotListDatatotal(long guilds, long user, int shardCount) Statistics for the whole bot.static BotListDatatotal(ShardManager shardManager) Statistics for the whole bot, taken from the caches of the shard manager.longuser()Returns the value of theuserrecord component.
-
Constructor Details
-
BotListData
public BotListData(long guilds, long user, int shardId, int shardCount) Creates an instance of aBotListDatarecord class.- Parameters:
guilds- the value for theguildsrecord componentuser- the value for theuserrecord componentshardId- the value for theshardIdrecord componentshardCount- the value for theshardCountrecord component
-
-
Method Details
-
total
Statistics for the whole bot.- Parameters:
guilds- guild countuser- user countshardCount- total number of shards- Returns:
- statistics without a shard id
-
total
Statistics for the whole bot, taken from the caches of the shard manager.- Parameters:
shardManager- shard manager- Returns:
- statistics without a shard id
-
shards
Statistics per shard, taken from the caches of each running shard.- Parameters:
shardManager- shard manager- Returns:
- one entry per running shard
-
isShard
public boolean isShard()Whether these statistics belong to a single shard.- Returns:
- true for shard statistics
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
guilds
-
user
-
shardId
-
shardCount
public int shardCount()Returns the value of theshardCountrecord component.- Returns:
- the value of the
shardCountrecord component
-