Class JDAContext
java.lang.Object
com.github.kaktushose.jda.commands.JDAContext
Wrapper class for
JDA
and ShardManager
. Use performTask(Consumer)
when you need to do work with an JDA
object.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionSnowflakeCacheView
of all cachedGuild
s.void
performTask
(Consumer<JDA> consumer) Performs an operation on either theJDA
object or on all shards.void
shutdown()
Shutdown the underlyingJDA
orShardManager
instance
-
Field Details
-
log
public static final org.slf4j.Logger log
-
-
Method Details
-
performTask
-
getGuildCache
SnowflakeCacheView
of all cachedGuild
s.- Returns:
- the
SnowflakeCacheView
-
shutdown
public void shutdown()Shutdown the underlyingJDA
orShardManager
instance
-