Package net.dv8tion.jda.api.utils
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
-
ClassDescriptionRepresents files that are attached to requests.A utility class to retrieve attachments.Represents existing message attachment.Filter function for member chunking of guilds.Iterator holding a resource that must be free'd by the consumer.Compression algorithms that can be used with JDA.Implementation of
SessionController
which respects concurrent shard login.A utility class to download files.Represents a file that is intended to be uploaded to Discord for arbitrary requests.A utility class to retrieve images.IOBiConsumer<T,R> Consumer accepting two arguments and throwingIOException
.IOConsumer<T>Consumer accepting one argument and throwingIOException
.IOFunction<T,R> Function accepting one argument and throwingIOException
.LockIterator<T>Simple implementation of aClosableIterator
that uses a lock.Implements an algorithm that can strip or replace markdown in any supplied string.Utility class to escape markdown characters.Policy which decides whether a member (and respective user) should be kept in cache.Utility methods for various aspects of the API.Once<E extends GenericEvent>Helper class to listen to an event, once.Once.Builder<E extends GenericEvent>Builds a one-time event listener, can be reused.Procedure<T>Iteration procedure accepting one argument and returning whether to continue iteration.Result<T>Represents a computation or task result.Controls states and behaviour of one or multipleJDA
instances.Represents a WebSocketClient request to start a session.POJO containing the gateway endpoint and recommended shard total for a shard manager.Simple implementation ofSessionController
without supporting concurrency.Utility to strategically split strings.Function which applies a programmable strategy used to determine a splitting point.Utility enum used to provide different markdown styles for timestamps.Utility class representing Discord Markdown timestamps.Utility for various time related features of the API.The WidgetUtil is a class for interacting with various facets of Discord's guild widgetsRepresents the available banner types
Each of these has a different appearance:Represents the color scheme of the widget
These color themes match Discord's dark and light themes