Class JDAContext
java.lang.Object
com.github.kaktushose.jda.commands.JDAContext
Wrapper class for JDA and ShardManager. Use
invalid reference
#performTask(Consumer)
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
-