Glossary
#
Core classes#
DiscordClientMain REST API wrapper, and an entry point to spawn Gateway connections. Can be obtained by calling getClient().rest()
from most objects.
#
CoreResourcesA mediator for resources essential to operate on DiscordClient
, like the RestClient
, JacksonResources
and ReactorResources
.
#
GatewayDiscordClientDiscord Gateway is the websocket connection receiving real-time updates. Starting from v3.1 we call GatewayDiscordClient
to the manager of all resources and state regarding a shard group. Connections are maintained by it and is capable of giving access to cached entities from updates. Can be obtained by calling getClient()
from most objects.
#
GatewayBootstrapA builder to create a GatewayDiscordClient
. The place where resources and many configurations are set before connecting to Discord Gateway. Defaults are used to enable built-in sharding and can be customized in many ways.
#
GatewayClientKeeps all state regarding a single shard lifecycle, providing automatic reconnections and forwarding updates to the parent GatewayDiscordClient
.
#
GatewayResourcesA mediator for most resources required by a GatewayClient
to operate. The rest are provided during GatewayBootstrap
setup and are used to build GatewayOptions
.
#
GatewayOptionsThe set of configuration passed to a GatewayClient
in order to be created.
#
ShardCoordinatorA manager in charge of relaying lifecycle events for sharding. It is used to notify clients that shards are identifying, connecting or disconnecting to allow for distributed application scenarios where the notification may be relayed across boundaries.
#
StoreStarting from v3.2, a Store is the central component for all entity caching from the real-time Gateway, it receives updates from the connected shard group.
#
EventDispatcherPublishes Gateway events to your bot application. Since v3.1 the events are coming from all shards in a shard group, so a single instance is enough for a GatewayDiscordClient
.
#
ReactorResourcesEncapsulates Reactor Netty HttpClient and Scheduler for blocking and timed tasks, can be customized.
#
JacksonResourcesJackson ObjectMapper configured specifically for Discord4J, can be customized.
#
RouterFactory and RouterFactory to create a Router
which performs REST API requests. Can be customized to coordinate multiple instances.