Class JDAContext
java.lang.Object
io.github.kaktushose.jdac.JDAContext
Wrapper class for
JDA and ShardManager. Use performTask(Consumer, boolean) when you need to do work with an JDA object.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionSnowflakeCacheViewof all cachedGuilds.voidperformTask(Consumer<JDA> consumer, boolean onlyFirstShard) Performs an operation on either theJDAobject or on all shards.voidshutdown()Shutdown the underlyingJDAorShardManagerinstance
-
Field Details
-
log
public static final org.slf4j.Logger log
-
-
Method Details
-
performTask
Performs an operation on either theJDAobject or on all shards.- Parameters:
consumer- the operation to performonlyFirstShard- whether this task should only be executed on the first shard if aShardManageris used
-
getGuildCache
SnowflakeCacheViewof all cachedGuilds.- Returns:
- the
SnowflakeCacheView
-
applicationEmojis
-
shutdown
public void shutdown()Shutdown the underlyingJDAorShardManagerinstance
-