Interface DiscordApi

    • Field Detail

      • ESCAPED_CHARACTER

        static final java.util.regex.Pattern ESCAPED_CHARACTER
    • Method Detail

      • getToken

        java.lang.String getToken()
        Gets the used token.
        Returns:
        The used token.
      • getPrefixedToken

        java.lang.String getPrefixedToken()
        Gets the used token with the bot prefix, that way it is usable directly in the authentication header for custom REST calls.
        Returns:
        The prefixed, used token.
      • getIntents

        java.util.Set<Intent> getIntents()
        Gets the intents used to receive some or all events specified in Intent.
        Returns:
        The intents for the events.
      • getThreadPool

        ThreadPool getThreadPool()
        Gets the thread pool which is internally used.
        Returns:
        The internally used thread pool.
      • setEventsDispatchable

        void setEventsDispatchable​(boolean dispatchEvents)
        Sets whether this API instance can dispatch events.
        Parameters:
        dispatchEvents - Whether events can be dispatched.
      • canDispatchEvents

        boolean canDispatchEvents()
        Gets whether this API instance can dispatch events.
        Returns:
        Whether events can be dispatched.
      • getGlobalApplicationCommands

        java.util.concurrent.CompletableFuture<java.util.Set<ApplicationCommand>> getGlobalApplicationCommands()
        Gets all global commands for the application.
        Returns:
        All global commands.
      • getGlobalApplicationCommandById

        java.util.concurrent.CompletableFuture<ApplicationCommand> getGlobalApplicationCommandById​(long applicationCommandId)
        Gets an application command by its id.
        Parameters:
        applicationCommandId - The id of the application command.
        Returns:
        The application command with the given id.
      • getServerApplicationCommands

        java.util.concurrent.CompletableFuture<java.util.Set<ApplicationCommand>> getServerApplicationCommands​(Server server)
        Gets all application commands for the given server.
        Parameters:
        server - The server to get the application commands from.
        Returns:
        All application commands from the server.
      • getServerApplicationCommandById

        java.util.concurrent.CompletableFuture<ApplicationCommand> getServerApplicationCommandById​(Server server,
                                                                                                   long applicationCommandId)
        Gets a server application command by its id.
        Parameters:
        server - The server to get the application commands from.
        applicationCommandId - The id of the server application command.
        Returns:
        The server application command with the given id.
      • getGlobalSlashCommands

        java.util.concurrent.CompletableFuture<java.util.Set<SlashCommand>> getGlobalSlashCommands()
        Gets all global slash commands for the application.
        Returns:
        All global slash commands.
      • getGlobalSlashCommandById

        java.util.concurrent.CompletableFuture<SlashCommand> getGlobalSlashCommandById​(long commandId)
        Gets a slash command by its id.
        Parameters:
        commandId - The id of the slash command.
        Returns:
        The slash command with the given id.
      • getServerSlashCommands

        java.util.concurrent.CompletableFuture<java.util.Set<SlashCommand>> getServerSlashCommands​(Server server)
        Gets all slash commands for the given server.
        Parameters:
        server - The server to get the slash commands from.
        Returns:
        All slash commands from the server.
      • getServerSlashCommandById

        java.util.concurrent.CompletableFuture<SlashCommand> getServerSlashCommandById​(Server server,
                                                                                       long commandId)
        Gets a server slash command by its id.
        Parameters:
        server - The server to get the slash commands from.
        commandId - The id of the server slash command.
        Returns:
        The server slash command with the given id.
      • getGlobalUserContextMenus

        java.util.concurrent.CompletableFuture<java.util.Set<UserContextMenu>> getGlobalUserContextMenus()
        Gets all global user context menus for the application.
        Returns:
        All global user context menus.
      • getGlobalUserContextMenuById

        java.util.concurrent.CompletableFuture<UserContextMenu> getGlobalUserContextMenuById​(long commandId)
        Gets a global user context menu by its id.
        Parameters:
        commandId - The id of the user context menu.
        Returns:
        The user context menu with the given id.
      • getServerUserContextMenus

        java.util.concurrent.CompletableFuture<java.util.Set<UserContextMenu>> getServerUserContextMenus​(Server server)
        Gets all user context menus for the given server.
        Parameters:
        server - The server to get the user context menus from.
        Returns:
        All user context menus from the server.
      • getServerUserContextMenuById

        java.util.concurrent.CompletableFuture<UserContextMenu> getServerUserContextMenuById​(Server server,
                                                                                             long commandId)
        Gets a server user context menu by its id.
        Parameters:
        server - The server to get the user context menu from.
        commandId - The id of the server user context menu.
        Returns:
        The server user context menu with the given id.
      • getGlobalMessageContextMenus

        java.util.concurrent.CompletableFuture<java.util.Set<MessageContextMenu>> getGlobalMessageContextMenus()
        Gets all global message context menus for the application.
        Returns:
        All global message context menus.
      • getGlobalMessageContextMenuById

        java.util.concurrent.CompletableFuture<MessageContextMenu> getGlobalMessageContextMenuById​(long commandId)
        Gets a global message context menu by its id.
        Parameters:
        commandId - The id of the message context menu.
        Returns:
        The message context menu with the given id.
      • getServerMessageContextMenus

        java.util.concurrent.CompletableFuture<java.util.Set<MessageContextMenu>> getServerMessageContextMenus​(Server server)
        Gets all message context menus for the given server.
        Parameters:
        server - The server to get the message context menus from.
        Returns:
        All message context menus from the server.
      • getServerMessageContextMenuById

        java.util.concurrent.CompletableFuture<MessageContextMenu> getServerMessageContextMenuById​(Server server,
                                                                                                   long commandId)
        Gets a server message context menu by its id.
        Parameters:
        server - The server to get the message context menu from.
        commandId - The id of the server message context menu.
        Returns:
        The server message context menu with the given id.
      • getServerApplicationCommandPermissions

        java.util.concurrent.CompletableFuture<java.util.Set<ServerApplicationCommandPermissions>> getServerApplicationCommandPermissions​(Server server)
        Gets all server application command permissions from the given server.
        Parameters:
        server - The server.
        Returns:
        All server application command permissions.
      • getServerApplicationCommandPermissionsById

        java.util.concurrent.CompletableFuture<ServerApplicationCommandPermissions> getServerApplicationCommandPermissionsById​(Server server,
                                                                                                                               long commandId)
        Gets a server application command permissions by it ID from the given server.
        Parameters:
        server - The server.
        commandId - The command ID.
        Returns:
        The server application command permissions for the given ID.
      • bulkOverwriteServerApplicationCommands

        default java.util.concurrent.CompletableFuture<java.util.Set<ApplicationCommand>> bulkOverwriteServerApplicationCommands​(Server server,
                                                                                                                                 java.util.Set<? extends ApplicationCommandBuilder<?,​?,​?>> applicationCommandBuilderList)
        Bulk overwrites the servers application commands. This should be preferably used when updating and/or creating multiple application commands at once instead of ApplicationCommandUpdater.updateForServer(Server) and ApplicationCommandBuilder.createForServer(Server)
        Parameters:
        applicationCommandBuilderList - A set containing the ApplicationCommandBuilders.
        server - The server where the bulk overwrite should be performed on which should be used to perform the bulk overwrite.
        Returns:
        All application commands.
      • bulkOverwriteServerApplicationCommands

        java.util.concurrent.CompletableFuture<java.util.Set<ApplicationCommand>> bulkOverwriteServerApplicationCommands​(long server,
                                                                                                                         java.util.Set<? extends ApplicationCommandBuilder<?,​?,​?>> applicationCommandBuilderList)
        Bulk overwrites the servers application commands. This should be preferably used when updating and/or creating multiple application commands at once instead of ApplicationCommandUpdater.updateForServer(Server) and ApplicationCommandBuilder.createForServer(Server)
        Parameters:
        server - The server where the bulk overwrite should be performed on which should be used to perform the bulk overwrite.
        applicationCommandBuilderList - A list containing the ApplicationCommandBuilders.
        Returns:
        All application commands.
      • getUncachedMessageUtil

        UncachedMessageUtil getUncachedMessageUtil()
        Gets a utility class to interact with uncached messages.
        Returns:
        A utility class to interact with uncached messages.
      • getGlobalRatelimiter

        java.util.Optional<Ratelimiter> getGlobalRatelimiter()
        Gets the current global ratelimiter.

        **Note:** This method returns an Optional for historic reasons. If you did not provide a ratelimiter by yourself, this method will return a LocalRatelimiter which is set to 5 requests per 112 ms, resulting in about 45 requests per second. This ratelimiter is shared by every bot with the same token in the same Java program.

        Returns:
        The current global ratelimiter.
      • getGatewayIdentifyRatelimiter

        Ratelimiter getGatewayIdentifyRatelimiter()
        Gets the current gateway identify ratelimiter.

        If you did not provide a ratelimiter yourself, this method will return a LocalRatelimiter which is set to allow one gateway identify request per 5500ms and is shared with every bot with the same token in the same Java program.

        Returns:
        The current gateway identify ratelimiter.
      • getLatestGatewayLatency

        java.time.Duration getLatestGatewayLatency()
        Gets the latest gateway latency.

        To calculate the gateway latency, Javacord measures the time it takes for Discord to answer the gateway heartbeat packet with a heartbeat ack packet. Please notice, that this values does only get updated on every heartbeat and not on every method call. To calculate an average, you have to collect the latency over a period of multiple minutes.

        In very rare cases, the latency will be -1 ns directly after startup, because the initial heartbeat was not answered yet. Usually, the heartbeat is answered before the bot finished loading.

        Expected latency: Usually, you can expect a latency between 30 ms and 300 ms with a good internet connection. This value may vary, depending on your location, time of day, Discord's status, and the current workload of your system. A value above 1000 ms is usually an indicator that something is wrong.

        Returns:
        The latest measured gateway latency.
      • measureRestLatency

        java.util.concurrent.CompletableFuture<java.time.Duration> measureRestLatency()
        Measures, how long Javacord will need to perform a single REST call.

        This method does not measure the "true" latency to Discord's REST endpoints because the request is handled by Javacord like any other request, including rate-limit handling. This causes some small delays that negatively affects the latency. However, this provides a somewhat realistic measurement on how long a typical REST call of Javacord will need. The latency is influenced by many non-network related factors like your system's current workload.

        This method uses the GET /users/@me endpoint to test the latency. The method ensures that only one ping measurement is performed at once by the same DiscordApi instance.

        Warning: This method does not bypass the global ratelimit check. If your bot gets ratelimited globally, the latency will appear higher that it really is!

        Expected latency: Usually, you can expect a latency between 50 ms and 500 ms with a good internet connection. This value may vary, depending on your location, time of day, Discord's status, and the current workload of your system. A value above 1000 ms is usually an indicator that something is wrong. It is recommended to perform multiple tests and calculate an average value.

        Returns:
        The measured latency.
      • createBotInvite

        default java.lang.String createBotInvite()
        Creates an invite link for this bot. The method only works for bot accounts!
        Returns:
        An invite link for this bot.
      • createBotInvite

        default java.lang.String createBotInvite​(Permissions permissions)
        Creates an invite link for this bot. The method only works for bot accounts!
        Parameters:
        permissions - The permissions which should be granted to the bot.
        Returns:
        An invite link for this bot.
      • setMessageCacheSize

        void setMessageCacheSize​(int capacity,
                                 int storageTimeInSeconds)
        Sets the cache size of all caches. These settings are applied on a per-channel basis. It overrides all previous settings, so it's recommended to directly set it after logging in, if you want to change some channel specific cache settings, too. Please notice that the cache is cleared only once every minute!
        Parameters:
        capacity - The capacity of the message cache.
        storageTimeInSeconds - The maximum age of cached messages.
      • getDefaultMessageCacheCapacity

        int getDefaultMessageCacheCapacity()
        Gets the default message cache capacity which is applied for every newly created channel.
        Returns:
        The default message cache capacity which is applied for every newly created channel.
      • getDefaultMessageCacheStorageTimeInSeconds

        int getDefaultMessageCacheStorageTimeInSeconds()
        Gets the default maximum age of cached messages.
        Returns:
        The default maximum age of cached messages.
      • setAutomaticMessageCacheCleanupEnabled

        void setAutomaticMessageCacheCleanupEnabled​(boolean automaticMessageCacheCleanupEnabled)
        Sets whether automatic message cache cleanup is enabled for all existing message caches and all newly created ones.
        Parameters:
        automaticMessageCacheCleanupEnabled - Whether automatic message cache cleanup is enabled.
      • isDefaultAutomaticMessageCacheCleanupEnabled

        boolean isDefaultAutomaticMessageCacheCleanupEnabled()
        Gets whether automatic message cache cleanup is enabled.
        Returns:
        Whether automatic message cache cleanup is enabled.
      • getCurrentShard

        int getCurrentShard()
        Gets the current shard of the bot, starting with 0.
        Returns:
        The current shard of the bot.
      • getTotalShards

        int getTotalShards()
        Gets the total amount of shards. If the total amount is 0 sharding is disabled.
        Returns:
        The total amount of shards.
      • isWaitingForServersOnStartup

        boolean isWaitingForServersOnStartup()
        Checks if Javacord is waiting for all servers to become available on startup.
        Returns:
        Whether Javacord is waiting for all servers to become available on startup or not.
      • isWaitingForUsersOnStartup

        boolean isWaitingForUsersOnStartup()
        Checks if Javacord is waiting for all servers to get cached on startup.
        Returns:
        Whether Javacord is waiting for all users to get cached on startup or not.
      • updateStatus

        void updateStatus​(UserStatus status)
        Updates the status of this bot. The update might not be visible immediately as it's through the websocket and only a limited amount of status changes is allowed per minute.
        Parameters:
        status - The status of this bot.
      • getStatus

        UserStatus getStatus()
        Gets the status which should be displayed for this bot. This might not be the status which is really displayed in the client, but it's the status which Javacord is trying to set for your bot, so it might change in the client a few seconds afterwards.
        Returns:
        The status which should be displayed for this bot.
      • updateActivity

        void updateActivity​(java.lang.String name)
        Updates the activity of this bot, represented as "Playing Half-Life 3" for example.
        Parameters:
        name - The name of the activity.
      • updateActivity

        void updateActivity​(ActivityType type,
                            java.lang.String name)
        Updates the activity of this bot with any type.
        Parameters:
        type - The type of the activity.
        name - The name of the activity.
      • updateActivity

        void updateActivity​(java.lang.String name,
                            java.lang.String streamingUrl)
        Updates the activity of this bot with a streaming url, represented as "Streaming Half-Life 3" for example. The update might not be visible immediately as it's through the websocket and only a limited amount of activity status changes is allowed per minute.
        Parameters:
        name - The name of the activity.
        streamingUrl - The streaming url of the activity.
      • unsetActivity

        void unsetActivity()
        Unsets the activity of this bot.
      • getActivity

        java.util.Optional<Activity> getActivity()
        Gets the activity which should be displayed. This might not be the activity which is really displayed in the client, but it's the activity which Javacord is trying to set for your bot, so it might change in the client a few seconds afterwards.
        Returns:
        The activity which should be displayed.
      • getYourself

        User getYourself()
        Gets a user of the connected account. This may be a bot user (for normal bots), or a regular user (for client-bots).
        Returns:
        The user of the connected account.
      • getCachedTeam

        default java.util.Optional<Team> getCachedTeam()
        Gets the team of the application.
        Returns:
        The team of the application, if applicable.
        See Also:
        ApplicationInfo.getTeam()
      • requestTeam

        default java.util.concurrent.CompletableFuture<java.util.Optional<Team>> requestTeam()
        Requests the team of the application.
        Returns:
        The team of the application.
        See Also:
        ApplicationInfo.getTeam()
      • getClientId

        default long getClientId()
        Gets the client id of the application.
        Returns:
        The client id of the application.
        See Also:
        ApplicationInfo.getClientId()
      • disconnect

        java.util.concurrent.CompletableFuture<java.lang.Void> disconnect()
        Disconnects the bot. After disconnecting you should NOT use this instance again.
        Returns:
        A future that completes once the disconnect is finished.
      • setReconnectDelay

        void setReconnectDelay​(java.util.function.Function<java.lang.Integer,​java.lang.Integer> reconnectDelayProvider)
        Sets a function which is used to get the delay between reconnects.
        Parameters:
        reconnectDelayProvider - A function which gets the amount of reconnects (starting with 1) as the parameter and should return the delay in seconds to wait for the next reconnect attempt. By default, the function reconnect delay is calculated using the following equation: f(x): (x^1.5-(1/(1/(0.1*x)+1))*x^1.5)+(currentShard*6). This would result in a delay which looks like this for a bot with 1 shard:
        Reconnect Delays
        Attempt Delay
        11
        22
        34
        46
        57
        ......
        1016
        1523
        2030
        ......
        5059
        10091
        150115
        ......
        Too many reconnect attempts may cause a token reset (usually 1000 per day), so you should always make sure to not provide a function which might exceed this limit. You should also make sure to take into account the amount of shards!
      • getReconnectDelay

        int getReconnectDelay​(int attempt)
        Gets the reconnect delay for a given amount of attempts.
        Parameters:
        attempt - The amount of attempts (starting with 1)
        Returns:
        The reconnect delay in seconds.
      • requestApplicationInfo

        java.util.concurrent.CompletableFuture<ApplicationInfo> requestApplicationInfo()
        Gets the application info of the bot.

        This will always request the up to date application info and update the cache.

        Returns:
        The application info of the bot.
        See Also:
        getCachedApplicationInfo()
      • getWebhookById

        java.util.concurrent.CompletableFuture<Webhook> getWebhookById​(long id)
        Gets a webhook by its id.
        Parameters:
        id - The id of the webhook.
        Returns:
        The webhook with the given id.
      • getIncomingWebhookByIdAndToken

        java.util.concurrent.CompletableFuture<IncomingWebhook> getIncomingWebhookByIdAndToken​(java.lang.String id,
                                                                                               java.lang.String token)
        Gets an incoming webhook by its id and its token.
        Parameters:
        id - The id of the incoming webhook.
        token - The token of the incoming webhook.
        Returns:
        The incoming webhook with the given id.
      • getIncomingWebhookByIdAndToken

        default java.util.concurrent.CompletableFuture<IncomingWebhook> getIncomingWebhookByIdAndToken​(long id,
                                                                                                       java.lang.String token)
        Gets an incoming webhook by its id and its token.
        Parameters:
        id - The id of the incoming webhook.
        token - The token of the incoming webhook.
        Returns:
        The incoming webhook with the given id.
      • getIncomingWebhookByUrl

        default java.util.concurrent.CompletableFuture<IncomingWebhook> getIncomingWebhookByUrl​(java.lang.String url)
                                                                                         throws java.lang.IllegalArgumentException
        Gets a webhook by its url.
        Parameters:
        url - The url of the message.
        Returns:
        The incoming webhook with the given url.
        Throws:
        java.lang.IllegalArgumentException - If the link isn't valid.
      • getUnavailableServers

        java.util.Set<java.lang.Long> getUnavailableServers()
        Gets the ids of all unavailable servers.
        Returns:
        The ids of all unavailable servers.
      • getInviteByCode

        java.util.concurrent.CompletableFuture<Invite> getInviteByCode​(java.lang.String code)
        Gets an invite by its code.
        Parameters:
        code - The code of the invite.
        Returns:
        The invite with the given code.
      • getInviteWithMemberCountsByCode

        java.util.concurrent.CompletableFuture<Invite> getInviteWithMemberCountsByCode​(java.lang.String code)
        Gets an invite by its code while requesting additional information.
        Parameters:
        code - The code of the invite.
        Returns:
        The invite with the given code.
      • createServerBuilder

        default ServerBuilder createServerBuilder()
        Creates a server builder which can be used to create servers.
        Returns:
        A server builder.
      • createAccountUpdater

        default AccountUpdater createAccountUpdater()
        Creates an account updater for the current account.
        Returns:
        An account updater for the current account.
      • updateUsername

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateUsername​(java.lang.String username)
        Updates the username of the current account.

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        username - The new username.
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(java.awt.image.BufferedImage avatar)
        Updates the avatar of the current account. This method assumes the file type is "png"!

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(java.awt.image.BufferedImage avatar,
                                                                                    java.lang.String fileType)
        Updates the avatar of the current account.

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        fileType - The type of the avatar, e.g. "png" or "jpg".
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(java.io.File avatar)
        Updates the avatar of the current account.

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(Icon avatar)
        Updates the avatar of the current account.

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(java.net.URL avatar)
        Updates the avatar of the current account.

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(byte[] avatar)
        Updates the avatar of the current account. This method assumes the file type is "png"!

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(byte[] avatar,
                                                                                    java.lang.String fileType)
        Updates the avatar of the current account.

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        fileType - The type of the avatar, e.g. "png" or "jpg".
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(java.io.InputStream avatar)
        Updates the avatar of the current account. This method assumes the file type is "png"!

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        Returns:
        A future to check if the update was successful.
      • updateAvatar

        default java.util.concurrent.CompletableFuture<java.lang.Void> updateAvatar​(java.io.InputStream avatar,
                                                                                    java.lang.String fileType)
        Updates the avatar of the current account.

        If you want to update several settings at once, it's recommended to use the AccountUpdater from createAccountUpdater() which provides a better performance!

        Parameters:
        avatar - The new avatar.
        fileType - The type of the avatar, e.g. "png" or "jpg".
        Returns:
        A future to check if the update was successful.
      • isUserCacheEnabled

        boolean isUserCacheEnabled()
        Checks if the user cache is enabled.
        Returns:
        Whether the user cache is enabled;
      • hasAllUsersInCache

        default boolean hasAllUsersInCache()
        Checks if all users of available servers are in the cache.
        Returns:
        Whether all users of available servers are in the cache.
      • getCachedUsers

        java.util.Set<User> getCachedUsers()
        Gets all currently cached users.
        Returns:
        All currently cached users.
      • getCachedUserById

        java.util.Optional<User> getCachedUserById​(long id)
        Gets a cached user by its id.
        Parameters:
        id - The id of the user.
        Returns:
        The user with the given id.
      • getCachedUserById

        default java.util.Optional<User> getCachedUserById​(java.lang.String id)
        Gets a cached user by its id.
        Parameters:
        id - The id of the user.
        Returns:
        The user with the given id.
      • getUserById

        java.util.concurrent.CompletableFuture<User> getUserById​(long id)
        Gets a user by its id.
        Parameters:
        id - The id of the user.
        Returns:
        The user with the given id.
      • getUserById

        default java.util.concurrent.CompletableFuture<User> getUserById​(java.lang.String id)
        Gets a user by its id.
        Parameters:
        id - The id of the user.
        Returns:
        The user with the given id.
      • makeMentionsReadable

        default java.lang.String makeMentionsReadable​(java.lang.String content,
                                                      Server server)
        Gets the readable content of the string, which replaces all mentions etc. with the actual name. The replacement happens as following:
        • User mentions: @nickname if the user has a nickname, @name if the user has no nickname, unchanged if the user is not in the cache.
        • Role mentions: @name if the role exists in the server, otherwise #deleted-role
        • Channel mentions: #name if the text channel exists in the server, otherwise #deleted-channel
        • Custom emoji: :name:. If the emoji is known, the real name is used, otherwise the name from the mention tag.
        Parameters:
        content - The string to strip the mentions away.
        server - The server to get the display name of users from.
        Returns:
        The readable content of the string.
      • makeMentionsReadable

        default java.lang.String makeMentionsReadable​(java.lang.String content)
        Gets the readable content of the string, which replaces all mentions etc. with the actual name. The replacement happens as following:
        • User mentions: @nickname if the user has a nickname, @name if the user has no nickname, unchanged if the user is not in the cache.
        • Role mentions: @name if the role exists in the server, otherwise #deleted-role
        • Channel mentions: #name if the text channel exists in the server, otherwise #deleted-channel
        • Custom emoji: :name:. If the emoji is known, the real name is used, otherwise the name from the mention tag.
        Parameters:
        content - The string to strip the mentions away.
        Returns:
        The readable content of the string.
      • getCachedUserByDiscriminatedName

        default java.util.Optional<User> getCachedUserByDiscriminatedName​(java.lang.String discriminatedName)
        Gets a user by its discriminated name like e.g. Bastian#8222. This method is case-sensitive!
        Parameters:
        discriminatedName - The discriminated name of the user.
        Returns:
        The user with the given discriminated name.
      • getCachedUserByDiscriminatedNameIgnoreCase

        default java.util.Optional<User> getCachedUserByDiscriminatedNameIgnoreCase​(java.lang.String discriminatedName)
        Gets a user by its discriminated name like e.g. Bastian#8222. This method is case-insensitive!
        Parameters:
        discriminatedName - The discriminated name of the user.
        Returns:
        The user with the given discriminated name.
      • getCachedUserByNameAndDiscriminator

        default java.util.Optional<User> getCachedUserByNameAndDiscriminator​(java.lang.String name,
                                                                             java.lang.String discriminator)
        Gets a user by its name and discriminator. This method is case-sensitive!
        Parameters:
        name - The name of the user.
        discriminator - The discriminator of the user.
        Returns:
        The user with the given name and discriminator.
      • getCachedUserByNameAndDiscriminatorIgnoreCase

        default java.util.Optional<User> getCachedUserByNameAndDiscriminatorIgnoreCase​(java.lang.String name,
                                                                                       java.lang.String discriminator)
        Gets a user by its name and discriminator. This method is case-insensitive!
        Parameters:
        name - The name of the user.
        discriminator - The discriminator of the user.
        Returns:
        The user with the given name and discriminator.
      • getCachedUsersByName

        default java.util.Set<User> getCachedUsersByName​(java.lang.String name)
        Gets all users with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the users.
        Returns:
        All users with the given name.
      • getCachedUsersByNameIgnoreCase

        default java.util.Set<User> getCachedUsersByNameIgnoreCase​(java.lang.String name)
        Gets all users with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the users.
        Returns:
        All users with the given name.
      • getCachedUsersByNickname

        default java.util.Set<User> getCachedUsersByNickname​(java.lang.String nickname,
                                                             Server server)
        Gets all users with the given nickname on the given server. This method is case-sensitive!
        Parameters:
        nickname - The nickname of the users.
        server - The server where to lookup the nickname.
        Returns:
        All users with the given nickname on the given server.
      • getCachedUsersByNicknameIgnoreCase

        default java.util.Set<User> getCachedUsersByNicknameIgnoreCase​(java.lang.String nickname,
                                                                       Server server)
        Gets all users with the given nickname on the given server. This method is case-insensitive!
        Parameters:
        nickname - The nickname of the users.
        server - The server where to lookup the nickname.
        Returns:
        All users with the given nickname on the given server.
      • getCachedUsersByDisplayName

        default java.util.Set<User> getCachedUsersByDisplayName​(java.lang.String displayName,
                                                                Server server)
        Gets all users with the given display name on the given server. This method is case-sensitive!
        Parameters:
        displayName - The display name of the users.
        server - The server where to lookup the display name.
        Returns:
        All users with the given display name on the given server.
      • getCachedUsersByDisplayNameIgnoreCase

        default java.util.Set<User> getCachedUsersByDisplayNameIgnoreCase​(java.lang.String displayName,
                                                                          Server server)
        Gets all users with the given display name on the given server. This method is case-insensitive!
        Parameters:
        displayName - The display name of the users.
        server - The server where to lookup the display name.
        Returns:
        All users with the given display name on the given server.
      • getCachedMessages

        MessageSet getCachedMessages()
        Gets a message set with all currently cached messages.
        Returns:
        A message set with all currently cached messages.
      • getCachedMessageById

        java.util.Optional<Message> getCachedMessageById​(long id)
        Gets a cached message by its id.
        Parameters:
        id - The id of the message.
        Returns:
        The cached message.
      • getCachedMessageById

        default java.util.Optional<Message> getCachedMessageById​(java.lang.String id)
        Gets a cached message by its id.
        Parameters:
        id - The id of the message.
        Returns:
        The cached message.
      • getMessageById

        default java.util.concurrent.CompletableFuture<Message> getMessageById​(long id,
                                                                               TextChannel channel)
        Gets a message by its id, if it exists and belongs to the given channel.
        Parameters:
        id - The id of the message.
        channel - The channel of the message.
        Returns:
        The message with the given id.
        See Also:
        TextChannel.getMessageById(long)
      • getMessageById

        default java.util.concurrent.CompletableFuture<Message> getMessageById​(java.lang.String id,
                                                                               TextChannel channel)
        Gets a message by its id, if it exists and belongs to the given channel.
        Parameters:
        id - The id of the message.
        channel - The channel of the message.
        Returns:
        The message with the given id.
        See Also:
        TextChannel.getMessageById(String)
      • getMessageByLink

        default java.util.Optional<java.util.concurrent.CompletableFuture<Message>> getMessageByLink​(java.lang.String link)
                                                                                              throws java.lang.IllegalArgumentException
        Gets a message by its link.
        Parameters:
        link - The link of the message.
        Returns:
        The message with the given link.
        Throws:
        java.lang.IllegalArgumentException - If the link isn't valid.
      • getCachedMessageByLink

        default java.util.Optional<Message> getCachedMessageByLink​(java.lang.String link)
                                                            throws java.lang.IllegalArgumentException
        Gets a cached message by its link.
        Parameters:
        link - The link of the message.
        Returns:
        The cached message with the given link.
        Throws:
        java.lang.IllegalArgumentException - If the link isn't valid.
      • getServers

        java.util.Set<Server> getServers()
        Gets all servers the bot is in.
        Returns:
        All servers the bot is in.
      • getServerById

        default java.util.Optional<Server> getServerById​(long id)
        Gets a server by its id.
        Parameters:
        id - The id of the server.
        Returns:
        The server with the given id.
      • getServerById

        default java.util.Optional<Server> getServerById​(java.lang.String id)
        Gets a server by its id.
        Parameters:
        id - The id of the server.
        Returns:
        The server with the given id.
      • getServersByName

        default java.util.Set<Server> getServersByName​(java.lang.String name)
        Gets all servers with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the servers.
        Returns:
        All servers with the given name.
      • getServersByNameIgnoreCase

        default java.util.Set<Server> getServersByNameIgnoreCase​(java.lang.String name)
        Gets all servers with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the servers.
        Returns:
        All servers with the given name.
      • getCustomEmojis

        java.util.Set<KnownCustomEmoji> getCustomEmojis()
        Gets all known custom emojis.
        Returns:
        All known custom emojis.
      • getCustomEmojiById

        default java.util.Optional<KnownCustomEmoji> getCustomEmojiById​(long id)
        Gets a custom emoji in this server by its id.
        Parameters:
        id - The id of the emoji.
        Returns:
        The emoji with the given id.
      • getCustomEmojiById

        default java.util.Optional<KnownCustomEmoji> getCustomEmojiById​(java.lang.String id)
        Gets a custom emoji in this server by its id.
        Parameters:
        id - The id of the emoji.
        Returns:
        The emoji with the given id.
      • getCustomEmojisByName

        default java.util.Set<KnownCustomEmoji> getCustomEmojisByName​(java.lang.String name)
        Gets all custom emojis with the given name in the server. This method is case-sensitive!
        Parameters:
        name - The name of the custom emojis.
        Returns:
        All custom emojis with the given name in this server.
      • getCustomEmojisByNameIgnoreCase

        default java.util.Set<KnownCustomEmoji> getCustomEmojisByNameIgnoreCase​(java.lang.String name)
        Gets all custom emojis with the given name in the server. This method is case-insensitive!
        Parameters:
        name - The name of the custom emojis.
        Returns:
        All custom emojis with the given name in this server.
      • getKnownCustomEmojiOrCreateCustomEmoji

        CustomEmoji getKnownCustomEmojiOrCreateCustomEmoji​(long id,
                                                           java.lang.String name,
                                                           boolean animated)
        Creates or gets a custom emoji to be used in other Javacord APIs. Use this if the custom emoji you're looking for is hosted on a different shard, and can't be accessed through getCustomEmojiById(). If the custom emoji is known, the method will return the known custom emoji instead of creating a new one. The method will always return a non-null value, even if the emoji does not exist which will lead to a non-functional custom emoji for further usage.
        Parameters:
        id - the ID of the custom emoji
        name - the name of the custom emoji
        animated - true if the emoji is animated; false otherwise
        Returns:
        the new (unknown) custom emoji instance
      • getNitroStickerPacks

        java.util.concurrent.CompletableFuture<java.util.Set<StickerPack>> getNitroStickerPacks()
        Gets all default sticker packs, which are available to nitro users.
        Returns:
        The nitro packs available to nitro users.
      • getStickerById

        java.util.Optional<Sticker> getStickerById​(long id)
        Gets a sticker by its ID.
        Parameters:
        id - The ID of the sticker.
        Returns:
        A future of the sticker.
      • getStickerById

        default java.util.Optional<Sticker> getStickerById​(java.lang.String id)
        Gets a sticker by its ID.
        Parameters:
        id - The ID of the sticker.
        Returns:
        A future of the sticker.
      • requestStickerById

        java.util.concurrent.CompletableFuture<Sticker> requestStickerById​(long id)
        Requests a sticker by its ID from the Discord API.
        Parameters:
        id - The ID of the sticker to request.
        Returns:
        A future of the sticker.
      • requestStickerById

        default java.util.concurrent.CompletableFuture<Sticker> requestStickerById​(java.lang.String id)
        Requests a sticker by its ID from the Discord API.
        Parameters:
        id - The ID of the sticker to request.
        Returns:
        A future of the sticker.
      • getRoles

        default java.util.Set<Role> getRoles()
        Gets all roles the bot knows.
        Returns:
        All roles the bot knows.
      • getRoleById

        default java.util.Optional<Role> getRoleById​(long id)
        Gets a role by its id.
        Parameters:
        id - The id of the role.
        Returns:
        The role with the given id.
      • getRoleById

        default java.util.Optional<Role> getRoleById​(java.lang.String id)
        Gets a role by its id.
        Parameters:
        id - The id of the role.
        Returns:
        The role with the given id.
      • getRolesByName

        default java.util.Set<Role> getRolesByName​(java.lang.String name)
        Gets all roles with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the roles.
        Returns:
        All roles with the given name.
      • getRolesByNameIgnoreCase

        default java.util.Set<Role> getRolesByNameIgnoreCase​(java.lang.String name)
        Gets all roles with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the roles.
        Returns:
        All roles with the given name.
      • getChannels

        java.util.Set<Channel> getChannels()
        Gets all channels of the bot.
        Returns:
        All channels of the bot.
      • getPrivateChannels

        java.util.Set<PrivateChannel> getPrivateChannels()
        Gets all private channels of the bot.
        Returns:
        All private channels of the bot.
      • getServerChannels

        java.util.Set<ServerChannel> getServerChannels()
        Gets all server channels of the bot.
        Returns:
        All server channels of the bot.
      • getRegularServerChannels

        java.util.Set<RegularServerChannel> getRegularServerChannels()
        Gets all regular server channels of the bot.
        Returns:
        All regular server channels of the bot.
      • getChannelCategories

        java.util.Set<ChannelCategory> getChannelCategories()
        Gets all channel categories of the bot.
        Returns:
        All channel categories of the bot.
      • getServerTextChannels

        java.util.Set<ServerTextChannel> getServerTextChannels()
        Gets all server text channels of the bot.
        Returns:
        All server text channels of the bot.
      • getServerForumChannels

        java.util.Set<ServerForumChannel> getServerForumChannels()
        Gets all server forum channels of the bot.
        Returns:
        All server forum channels of the bot.
      • getServerThreadChannels

        java.util.Set<ServerThreadChannel> getServerThreadChannels()
        Gets all the server thread channels of the bot.
        Returns:
        All server thread channels of the bot.
      • getPrivateServerThreadChannels

        java.util.Set<ServerThreadChannel> getPrivateServerThreadChannels()
        Gets all the private threads of the bot.
        Returns:
        All private threads of the bot.
      • getPublicServerThreadChannels

        java.util.Set<ServerThreadChannel> getPublicServerThreadChannels()
        Gets all the public threads of the bot.
        Returns:
        All the public threads of the bot.
      • getServerVoiceChannels

        java.util.Set<ServerVoiceChannel> getServerVoiceChannels()
        Gets all server voice channels of the bot.
        Returns:
        All server voice channels of the bot.
      • getServerStageVoiceChannels

        java.util.Set<ServerStageVoiceChannel> getServerStageVoiceChannels()
        Gets all server stage voice channels of the bot.
        Returns:
        All server stage voice channels of the bot.
      • getTextChannels

        java.util.Set<TextChannel> getTextChannels()
        Gets all text channels of the bot.
        Returns:
        All text channels of the bot.
      • getVoiceChannels

        java.util.Set<VoiceChannel> getVoiceChannels()
        Gets all voice channels of the bot.
        Returns:
        All voice channels of the bot.
      • getChannelById

        java.util.Optional<Channel> getChannelById​(long id)
        Gets a channel by its id.
        Parameters:
        id - The id of the channel.
        Returns:
        The channel with the given id.
      • getChannelById

        default java.util.Optional<Channel> getChannelById​(java.lang.String id)
        Gets a channel by its id.
        Parameters:
        id - The id of the channel.
        Returns:
        The channel with the given id.
      • getChannelsByName

        default java.util.Set<Channel> getChannelsByName​(java.lang.String name)
        Gets all channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the channels.
        Returns:
        All channels with the given name.
      • getChannelsByNameIgnoreCase

        default java.util.Set<Channel> getChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the channels.
        Returns:
        All channels with the given name.
      • getTextChannelById

        default java.util.Optional<TextChannel> getTextChannelById​(long id)
        Gets a text channel by its id.
        Parameters:
        id - The id of the text channel.
        Returns:
        The text channel with the given id.
      • getTextChannelById

        default java.util.Optional<TextChannel> getTextChannelById​(java.lang.String id)
        Gets a text channel by its id.
        Parameters:
        id - The id of the text channel.
        Returns:
        The text channel with the given id.
      • getTextChannelsByName

        default java.util.Set<TextChannel> getTextChannelsByName​(java.lang.String name)
        Gets all text channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the text channels.
        Returns:
        All text channels with the given name.
      • getTextChannelsByNameIgnoreCase

        default java.util.Set<TextChannel> getTextChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all text channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the text channels.
        Returns:
        All text channels with the given name.
      • getVoiceChannelById

        default java.util.Optional<VoiceChannel> getVoiceChannelById​(long id)
        Gets a voice channel by its id.
        Parameters:
        id - The id of the voice channel.
        Returns:
        The voice channel with the given id.
      • getVoiceChannelById

        default java.util.Optional<VoiceChannel> getVoiceChannelById​(java.lang.String id)
        Gets a voice channel by its id.
        Parameters:
        id - The id of the voice channel.
        Returns:
        The voice channel with the given id.
      • getVoiceChannelsByName

        default java.util.Set<VoiceChannel> getVoiceChannelsByName​(java.lang.String name)
        Gets all voice channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the voice channels.
        Returns:
        All voice channels with the given name.
      • getVoiceChannelsByNameIgnoreCase

        default java.util.Set<VoiceChannel> getVoiceChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all voice channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the voice channels.
        Returns:
        All voice channels with the given name.
      • getServerChannelById

        default java.util.Optional<ServerChannel> getServerChannelById​(long id)
        Gets a server channel by its id.
        Parameters:
        id - The id of the server channel.
        Returns:
        The server channel with the given id.
      • getServerChannelById

        default java.util.Optional<ServerChannel> getServerChannelById​(java.lang.String id)
        Gets a server channel by its id.
        Parameters:
        id - The id of the server channel.
        Returns:
        The server channel with the given id.
      • getServerChannelsByName

        default java.util.Set<ServerChannel> getServerChannelsByName​(java.lang.String name)
        Gets all server channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the server channels.
        Returns:
        All server channels with the given name.
      • getServerChannelsByNameIgnoreCase

        default java.util.Set<ServerChannel> getServerChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all server channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the server channels.
        Returns:
        All server channels with the given name.
      • getRegularServerChannelById

        default java.util.Optional<RegularServerChannel> getRegularServerChannelById​(long id)
        Gets a regular server channel by its id.
        Parameters:
        id - The id of the regular server channel.
        Returns:
        The regular server channel with the given id.
      • getRegularServerChannelById

        default java.util.Optional<RegularServerChannel> getRegularServerChannelById​(java.lang.String id)
        Gets a regular server channel by its id.
        Parameters:
        id - The id of the regular server channel.
        Returns:
        The regular server channel with the given id.
      • getRegularServerChannelsByName

        default java.util.Set<RegularServerChannel> getRegularServerChannelsByName​(java.lang.String name)
        Gets all regular server channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the regular server channels.
        Returns:
        All regular server channels with the given name.
      • getRegularServerChannelsByNameIgnoreCase

        default java.util.Set<RegularServerChannel> getRegularServerChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all regular server channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the regular server channels.
        Returns:
        All regular server channels with the given name.
      • getChannelCategoryById

        default java.util.Optional<ChannelCategory> getChannelCategoryById​(long id)
        Gets a channel category by its id.
        Parameters:
        id - The id of the channel category.
        Returns:
        The channel category with the given id.
      • getChannelCategoryById

        default java.util.Optional<ChannelCategory> getChannelCategoryById​(java.lang.String id)
        Gets a channel category by its id.
        Parameters:
        id - The id of the channel category.
        Returns:
        The channel category with the given id.
      • getChannelCategoriesByName

        default java.util.Set<ChannelCategory> getChannelCategoriesByName​(java.lang.String name)
        Gets all channel categories with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the channel categories.
        Returns:
        All channel categories with the given name.
      • getChannelCategoriesByNameIgnoreCase

        default java.util.Set<ChannelCategory> getChannelCategoriesByNameIgnoreCase​(java.lang.String name)
        Gets all channel categories with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the channel categories.
        Returns:
        All channel categories with the given name.
      • getServerTextChannelById

        default java.util.Optional<ServerTextChannel> getServerTextChannelById​(long id)
        Gets a server text channel by its id.
        Parameters:
        id - The id of the server text channel.
        Returns:
        The server text channel with the given id.
      • getServerTextChannelById

        default java.util.Optional<ServerTextChannel> getServerTextChannelById​(java.lang.String id)
        Gets a server text channel by its id.
        Parameters:
        id - The id of the server text channel.
        Returns:
        The server text channel with the given id.
      • getServerTextChannelsByName

        default java.util.Set<ServerTextChannel> getServerTextChannelsByName​(java.lang.String name)
        Gets all server text channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the server text channels.
        Returns:
        All server text channels with the given name.
      • getServerTextChannelsByNameIgnoreCase

        default java.util.Set<ServerTextChannel> getServerTextChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all server text channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the server text channels.
        Returns:
        All server text channels with the given name.
      • getServerForumChannelById

        default java.util.Optional<ServerForumChannel> getServerForumChannelById​(long id)
        Gets a server forum channel by its id.
        Parameters:
        id - The id of the server forum channel.
        Returns:
        The server forum channel with the given id.
      • getServerForumChannelById

        default java.util.Optional<ServerForumChannel> getServerForumChannelById​(java.lang.String id)
        Gets a server forum channel by its id.
        Parameters:
        id - The id of the server forum channel.
        Returns:
        The server forum channel with the given id.
      • getServerForumChannelsByName

        default java.util.Set<ServerForumChannel> getServerForumChannelsByName​(java.lang.String name)
        Gets all server forum channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the server forum channels.
        Returns:
        All server forum channels with the given name.
      • getServerForumChannelsByNameIgnoreCase

        default java.util.Set<ServerForumChannel> getServerForumChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all server forum channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the server forum channels.
        Returns:
        All server forum channels with the given name.
      • getServerThreadChannelById

        default java.util.Optional<ServerThreadChannel> getServerThreadChannelById​(long id)
        Gets a server thread channel by its id.
        Parameters:
        id - The id of the server thread channel.
        Returns:
        The server thread channel with the given id.
      • getServerThreadChannelById

        default java.util.Optional<ServerThreadChannel> getServerThreadChannelById​(java.lang.String id)
        Gets a server thread channel by its id.
        Parameters:
        id - The id of the server thread channel.
        Returns:
        The server thread channel with the given id.
      • getServerThreadChannelsByName

        default java.util.Set<ServerThreadChannel> getServerThreadChannelsByName​(java.lang.String name)
        Gets all server thread channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the server thread channels.
        Returns:
        All server thread channels with the given name.
      • getServerThreadChannelsByNameIgnoreCase

        default java.util.Set<ServerThreadChannel> getServerThreadChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all server thread channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the server thread channels.
        Returns:
        All server thread channels with the given name.
      • getServerVoiceChannelById

        default java.util.Optional<ServerVoiceChannel> getServerVoiceChannelById​(long id)
        Gets a server voice channel by its id.
        Parameters:
        id - The id of the server voice channel.
        Returns:
        The server voice channel with the given id.
      • getServerVoiceChannelById

        default java.util.Optional<ServerVoiceChannel> getServerVoiceChannelById​(java.lang.String id)
        Gets a server voice channel by its id.
        Parameters:
        id - The id of the server voice channel.
        Returns:
        The server voice channel with the given id.
      • getServerVoiceChannelsByName

        default java.util.Set<ServerVoiceChannel> getServerVoiceChannelsByName​(java.lang.String name)
        Gets all server voice channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the server voice channels.
        Returns:
        All server voice channels with the given name.
      • getServerVoiceChannelsByNameIgnoreCase

        default java.util.Set<ServerVoiceChannel> getServerVoiceChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all server voice channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the server voice channels.
        Returns:
        All server voice channels with the given name.
      • getServerStageVoiceChannelById

        default java.util.Optional<ServerStageVoiceChannel> getServerStageVoiceChannelById​(long id)
        Gets a server stage voice channel by its id.
        Parameters:
        id - The id of the server stage voice channel.
        Returns:
        The server stage voice channel with the given id.
      • getServerStageVoiceChannelById

        default java.util.Optional<ServerStageVoiceChannel> getServerStageVoiceChannelById​(java.lang.String id)
        Gets a server stage voice channel by its id.
        Parameters:
        id - The id of the server stage voice channel.
        Returns:
        The server stage voice channel with the given id.
      • getServerStageVoiceChannelsByName

        default java.util.Set<ServerStageVoiceChannel> getServerStageVoiceChannelsByName​(java.lang.String name)
        Gets all server stage voice channels with the given name. This method is case-sensitive!
        Parameters:
        name - The name of the server stage voice channels.
        Returns:
        All server stage voice channels with the given name.
      • getServerStageVoiceChannelsByNameIgnoreCase

        default java.util.Set<ServerStageVoiceChannel> getServerStageVoiceChannelsByNameIgnoreCase​(java.lang.String name)
        Gets all server stage voice channels with the given name. This method is case-insensitive!
        Parameters:
        name - The name of the server stage voice channels.
        Returns:
        All server stage voice channels with the given name.
      • getPrivateChannelById

        default java.util.Optional<PrivateChannel> getPrivateChannelById​(long id)
        Gets a private channel by its id.
        Parameters:
        id - The id of the private channel.
        Returns:
        The private channel with the given id.
      • getPrivateChannelById

        default java.util.Optional<PrivateChannel> getPrivateChannelById​(java.lang.String id)
        Gets a private channel by its id.
        Parameters:
        id - The id of the private channel.
        Returns:
        The private channel with the given id.