Package net.dv8tion.jda.api.utils
Package which contains all utilities for the JDA library.
These are used by JDA itself and can also be useful for the library user!
List of utilities:
MiscUtil
Various operations that don't have specific utility classes yet, mostly internals that are accessible from JDA entitiesWidgetUtil
This is not bound to a JDA instance and can view theWidget
for a specified Guild. (by id)MarkdownSanitizer
Parser for Discord markdown that can either escape or strip markdown from a stringSessionController
Special handler for session (re-)connects and global rate-limitsTimeUtil
Useful time conversion methods related to Discord
-
Interface Summary Interface Description AllowedMentions<R> Represents the operations used to whitelist/blacklist mentions.ChunkingFilter Filter function for member chunking of guilds.ClosableIterator<T> Iterator holding a resource that must be free'd by the consumer.IOBiConsumer<T,R> IOConsumer<T> IOFunction<T,R> MemberCachePolicy Policy which decides whether a member (and respective user) should be kept in cache.Procedure<T> SessionController Controls states and behaviour of one or multipleJDA
instances.SessionController.SessionConnectNode Represents a WebSocketClient request to start a session. -
Class Summary Class Description ConcurrentSessionController Implementation ofSessionController
which respects concurrent shard login.LockIterator<T> Simple implementation of aClosableIterator
that uses a lock.MarkdownSanitizer Implements and algorithm that can strip or replace markdown in any supplied string.MarkdownUtil MiscUtil Result<T> Represents a computation or task result.SessionController.ShardedGateway POJO containing the gateway endpoint and recommended shard total for a shard manager.SessionControllerAdapter Timestamp Utility class representing Discord Markdown timestamps.TimeUtil WidgetUtil The WidgetUtil is a class for interacting with various facets of Discord's guild widgetsWidgetUtil.Widget WidgetUtil.Widget.Member WidgetUtil.Widget.VoiceChannel WidgetUtil.Widget.VoiceState -
Enum Summary Enum Description AttachmentOption Options that can be applied to attachments inMessageAction
.Compression Compression algorithms that can be used with JDA.MarkdownSanitizer.SanitizationStrategy TimeFormat Utility enum used to provide different markdown styles for timestamps.WidgetUtil.BannerType Represents the available banner types
Each of these has a different appearance:WidgetUtil.WidgetTheme Represents the color scheme of the widget
These color themes match Discord's dark and light themes