Interface DiscordApi

    • Method Detail

      • getToken

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

        String getPrefixedToken​()
        Gets the used token with the AccountType.getTokenPrefix(), that way it is usable directly in the authentication header for custom REST calls.
        Returns:
        The prefixed, used token.
      • getThreadPool

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

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

        AccountType getAccountType​()
        Gets the type of the current account.
        Returns:
        The type of the current account.
      • createBotInvite

        default String createBotInvite​()
        Creates an invite link for the this bot. The method only works for bot accounts!
        Returns:
        An invite link for this bot.
        Throws:
        IllegalStateException - If the current account is not AccountType.BOT.
      • createBotInvite

        default String createBotInvite​(Permissions permissions)
        Creates an invite link for the 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.
        Throws:
        IllegalStateException - If the current account is not AccountType.BOT.
      • setMessageCacheSize

        void setMessageCacheSize​(int capacity,
                                 int storageTimeInSeconds)
        Sets the cache size of all caches. This 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.
      • 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​(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,
                            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​(String name,
                            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

        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.
      • getOwnerId

        long getOwnerId​()
        Gets the id of the application's owner.
        Returns:
        The id of the application's owner.
        Throws:
        IllegalStateException - If the current account is not AccountType.BOT.
      • getClientId

        long getClientId​()
        Gets the client id of the application.
        Returns:
        The client id of the application.
        Throws:
        IllegalStateException - If the current account is not AccountType.BOT.
      • disconnect

        void disconnect​()
        Disconnects the bot. After disconnecting you should NOT use this instance again.
      • setReconnectDelay

        void setReconnectDelay​(Function<Integer,Integer> reconnectDelayProvider)
        Sets a function which is used to get the delay between reconnects.
        Parameters:
        reconnectDelayProvider - A function which get's 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.
      • getApplicationInfo

        CompletableFuture<ApplicationInfo> getApplicationInfo​()
        Gets the application info of the bot. The method only works for bot accounts.
        Returns:
        The application info of the bot.
      • getWebhookById

        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.
      • getUnavailableServers

        Collection<Long> getUnavailableServers​()
        Gets a collection with the ids of all unavailable servers.
        Returns:
        A collection with the ids of all unavailable servers.
      • getInviteByCode

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

        CompletableFuture<Invite> getInviteWithMemberCountsByCode​(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 CompletableFuture<Void> updateUsername​(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 CompletableFuture<Void> updateAvatar​(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 CompletableFuture<Void> updateAvatar​(BufferedImage avatar,
                                                     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 CompletableFuture<Void> updateAvatar​(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 CompletableFuture<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 CompletableFuture<Void> updateAvatar​(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 CompletableFuture<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 CompletableFuture<Void> updateAvatar​(byte[] avatar,
                                                     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 CompletableFuture<Void> updateAvatar​(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 CompletableFuture<Void> updateAvatar​(InputStream avatar,
                                                     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.
      • getCachedUsers

        Collection<User> getCachedUsers​()
        Gets a collection with all currently cached users.
        Returns:
        A collection with all currently cached users.
      • getCachedUserById

        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 Optional<User> getCachedUserById​(String id)
        Gets a cached user by its id.
        Parameters:
        id - The id of the user.
        Returns:
        The user with the given id.
      • getUserById

        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 CompletableFuture<User> getUserById​(String id)
        Gets a user by its id.
        Parameters:
        id - The id of the user.
        Returns:
        The user with the given id.
      • getCachedUserByDiscriminatedName

        default Optional<User> getCachedUserByDiscriminatedName​(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 Optional<User> getCachedUserByDiscriminatedNameIgnoreCase​(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 Optional<User> getCachedUserByNameAndDiscriminator​(String name,
                                                                   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 Optional<User> getCachedUserByNameAndDiscriminatorIgnoreCase​(String name,
                                                                             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 Collection<User> getCachedUsersByName​(String name)
        Gets a collection with all users with the given name. This method is case sensitive!
        Parameters:
        name - The name of the users.
        Returns:
        A collection with all users with the given name.
      • getCachedUsersByNameIgnoreCase

        default Collection<User> getCachedUsersByNameIgnoreCase​(String name)
        Gets a collection with all users with the given name. This method is case insensitive!
        Parameters:
        name - The name of the users.
        Returns:
        A collection with all users with the given name.
      • getCachedUsersByNickname

        default Collection<User> getCachedUsersByNickname​(String nickname,
                                                          Server server)
        Gets a collection with 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:
        A collection with all users with the given nickname on the given server.
      • getCachedUsersByNicknameIgnoreCase

        default Collection<User> getCachedUsersByNicknameIgnoreCase​(String nickname,
                                                                    Server server)
        Gets a collection with 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:
        A collection with all users with the given nickname on the given server.
      • getCachedUsersByDisplayName

        default Collection<User> getCachedUsersByDisplayName​(String displayName,
                                                             Server server)
        Gets a collection with 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:
        A collection with all users with the given display name on the given server.
      • getCachedUsersByDisplayNameIgnoreCase

        default Collection<User> getCachedUsersByDisplayNameIgnoreCase​(String displayName,
                                                                       Server server)
        Gets a collection with 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:
        A collection with 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

        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 Optional<Message> getCachedMessageById​(String id)
        Gets a cached message by its id.
        Parameters:
        id - The id of the message.
        Returns:
        The cached message.
      • getServers

        Collection<Server> getServers​()
        Gets a collection with all servers the bot is in.
        Returns:
        A collection with all servers the bot is in.
      • getServerById

        default 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 Optional<Server> getServerById​(String id)
        Gets a server by its id.
        Parameters:
        id - The id of the server.
        Returns:
        The server with the given id.
      • getServersByName

        default Collection<Server> getServersByName​(String name)
        Gets a collection with all servers with the given name. This method is case sensitive!
        Parameters:
        name - The name of the servers.
        Returns:
        A collection with all servers with the given name.
      • getServersByNameIgnoreCase

        default Collection<Server> getServersByNameIgnoreCase​(String name)
        Gets a collection with all servers with the given name. This method is case insensitive!
        Parameters:
        name - The name of the servers.
        Returns:
        A collection with all servers with the given name.
      • getCustomEmojis

        Collection<KnownCustomEmoji> getCustomEmojis​()
        Gets a collection with all known custom emojis.
        Returns:
        A collection with all known custom emojis.
      • getCustomEmojiById

        default 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 Optional<KnownCustomEmoji> getCustomEmojiById​(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 Collection<KnownCustomEmoji> getCustomEmojisByName​(String name)
        Gets a collection with all custom emojis with the given name in the server. This method is case sensitive!
        Parameters:
        name - The name of the custom emojis.
        Returns:
        A collection with all custom emojis with the given name in this server.
      • getCustomEmojisByNameIgnoreCase

        default Collection<KnownCustomEmoji> getCustomEmojisByNameIgnoreCase​(String name)
        Gets a collection with all custom emojis with the given name in the server. This method is case insensitive!
        Parameters:
        name - The name of the custom emojis.
        Returns:
        A collection with all custom emojis with the given name in this server.
      • getRoles

        default Collection<Role> getRoles​()
        Gets a collection with all roles the bot knows.
        Returns:
        A collection with all roles the bot knows.
      • getRoleById

        default 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 Optional<Role> getRoleById​(String id)
        Gets a role by its id.
        Parameters:
        id - The id of the role.
        Returns:
        The role with the given id.
      • getRolesByName

        default Collection<Role> getRolesByName​(String name)
        Gets a collection with all roles with the given name. This method is case sensitive!
        Parameters:
        name - The name of the roles.
        Returns:
        A collection with all roles with the given name.
      • getRolesByNameIgnoreCase

        default Collection<Role> getRolesByNameIgnoreCase​(String name)
        Gets a collection with all roles with the given name. This method is case insensitive!
        Parameters:
        name - The name of the roles.
        Returns:
        A collection with all roles with the given name.
      • getChannels

        Collection<Channel> getChannels​()
        Gets a collection with all channels of the bot.
        Returns:
        A collection with all channels of the bot.
      • getGroupChannels

        default Collection<GroupChannel> getGroupChannels​()
        Gets a collection with all group channels of the bot.
        Returns:
        A collection with all group channels of the bot.
      • getPrivateChannels

        default Collection<PrivateChannel> getPrivateChannels​()
        Gets a collection with all private channels of the bot.
        Returns:
        A collection with all private channels of the bot.
      • getServerChannels

        default Collection<ServerChannel> getServerChannels​()
        Gets a collection with all server channels of the bot.
        Returns:
        A collection with all server channels of the bot.
      • getChannelCategories

        default Collection<ChannelCategory> getChannelCategories​()
        Gets a collection with all channel categories of the bot.
        Returns:
        A collection with all channel categories of the bot.
      • getServerTextChannels

        default Collection<ServerTextChannel> getServerTextChannels​()
        Gets a collection with all server text channels of the bot.
        Returns:
        A collection with all server text channels of the bot.
      • getServerVoiceChannels

        default Collection<ServerVoiceChannel> getServerVoiceChannels​()
        Gets a collection with all server voice channels of the bot.
        Returns:
        A collection with all server voice channels of the bot.
      • getTextChannels

        default Collection<TextChannel> getTextChannels​()
        Gets a collection with all text channels of the bot.
        Returns:
        A collection with all text channels of the bot.
      • getVoiceChannels

        default Collection<VoiceChannel> getVoiceChannels​()
        Gets a collection with all voice channels of the bot.
        Returns:
        A collection with all voice channels of the bot.
      • getChannelById

        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 Optional<Channel> getChannelById​(String id)
        Gets a channel by its id.
        Parameters:
        id - The id of the channel.
        Returns:
        The channel with the given id.
      • getChannelsByName

        default Collection<Channel> getChannelsByName​(String name)
        Gets a collection with all channels with the given name. This method is case sensitive!
        Parameters:
        name - The name of the channels. Can be null to search for group channels without name.
        Returns:
        A collection with all channels with the given name.
      • getChannelsByNameIgnoreCase

        default Collection<Channel> getChannelsByNameIgnoreCase​(String name)
        Gets a collection with all channels with the given name. This method is case insensitive!
        Parameters:
        name - The name of the channels. Can be null to search for group channels without name.
        Returns:
        A collection with all channels with the given name.
      • getTextChannelById

        default 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 Optional<TextChannel> getTextChannelById​(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 Collection<TextChannel> getTextChannelsByName​(String name)
        Gets a collection with all text channels with the given name. This method is case sensitive!
        Parameters:
        name - The name of the text channels. Can be null to search for group channels without name.
        Returns:
        A collection with all text channels with the given name.
      • getTextChannelsByNameIgnoreCase

        default Collection<TextChannel> getTextChannelsByNameIgnoreCase​(String name)
        Gets a collection with all text channels with the given name. This method is case insensitive!
        Parameters:
        name - The name of the text channels. Can be null to search for group channels without name.
        Returns:
        A collection with all text channels with the given name.
      • getVoiceChannelById

        default 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 Optional<VoiceChannel> getVoiceChannelById​(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 Collection<VoiceChannel> getVoiceChannelsByName​(String name)
        Gets a collection with all voice channels with the given name. This method is case sensitive!
        Parameters:
        name - The name of the voice channels. Can be null to search for group channels without name.
        Returns:
        A collection with all voice channels with the given name.
      • getVoiceChannelsByNameIgnoreCase

        default Collection<VoiceChannel> getVoiceChannelsByNameIgnoreCase​(String name)
        Gets a collection with all voice channels with the given name. This method is case insensitive!
        Parameters:
        name - The name of the voice channels. Can be null to search for group channels without name.
        Returns:
        A collection with all voice channels with the given name.
      • getServerChannelById

        default 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 Optional<ServerChannel> getServerChannelById​(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 Collection<ServerChannel> getServerChannelsByName​(String name)
        Gets a collection with all server channels with the given name. This method is case sensitive!
        Parameters:
        name - The name of the server channels.
        Returns:
        A collection with all server channels with the given name.
      • getServerChannelsByNameIgnoreCase

        default Collection<ServerChannel> getServerChannelsByNameIgnoreCase​(String name)
        Gets a collection with all server channels with the given name. This method is case insensitive!
        Parameters:
        name - The name of the server channels.
        Returns:
        A collection with all server channels with the given name.
      • getChannelCategoryById

        default 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 Optional<ChannelCategory> getChannelCategoryById​(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 Collection<ChannelCategory> getChannelCategoriesByName​(String name)
        Gets a collection with all channel categories with the given name. This method is case sensitive!
        Parameters:
        name - The name of the channel categories.
        Returns:
        A collection with all channel categories with the given name.
      • getChannelCategoriesByNameIgnoreCase

        default Collection<ChannelCategory> getChannelCategoriesByNameIgnoreCase​(String name)
        Gets a collection with all channel categories with the given name. This method is case insensitive!
        Parameters:
        name - The name of the channel categories.
        Returns:
        A collection with all channel categories with the given name.
      • getServerTextChannelById

        default 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 Optional<ServerTextChannel> getServerTextChannelById​(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 Collection<ServerTextChannel> getServerTextChannelsByName​(String name)
        Gets a collection with all server text channels with the given name. This method is case sensitive!
        Parameters:
        name - The name of the server text channels.
        Returns:
        A collection with all server text channels with the given name.
      • getServerTextChannelsByNameIgnoreCase

        default Collection<ServerTextChannel> getServerTextChannelsByNameIgnoreCase​(String name)
        Gets a collection with all server text channels with the given name. This method is case insensitive!
        Parameters:
        name - The name of the server text channels.
        Returns:
        A collection with all server text channels with the given name.
      • getServerVoiceChannelById

        default 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 Optional<ServerVoiceChannel> getServerVoiceChannelById​(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 Collection<ServerVoiceChannel> getServerVoiceChannelsByName​(String name)
        Gets a collection with all server voice channels with the given name. This method is case sensitive!
        Parameters:
        name - The name of the server voice channels.
        Returns:
        A collection with all server voice channels with the given name.
      • getServerVoiceChannelsByNameIgnoreCase

        default Collection<ServerVoiceChannel> getServerVoiceChannelsByNameIgnoreCase​(String name)
        Gets a collection with all server voice channels with the given name. This method is case insensitive!
        Parameters:
        name - The name of the server voice channels.
        Returns:
        A collection with all server voice channels with the given name.
      • getPrivateChannelById

        default 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 Optional<PrivateChannel> getPrivateChannelById​(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.
      • getGroupChannelById

        default Optional<GroupChannel> getGroupChannelById​(long id)
        Gets a group channel by its id.
        Parameters:
        id - The id of the group channel.
        Returns:
        The group channel with the given id.
      • getGroupChannelById

        default Optional<GroupChannel> getGroupChannelById​(String id)
        Gets a group channel by its id.
        Parameters:
        id - The id of the group channel.
        Returns:
        The group channel with the given id.
      • getGroupChannelsByName

        default Collection<GroupChannel> getGroupChannelsByName​(String name)
        Gets a collection with all group channels with the given name. This method is case sensitive!
        Parameters:
        name - The name of the group channels. Can be null to search for group channels without name.
        Returns:
        A collection with all group channels with the given name.
      • getGroupChannelsByNameIgnoreCase

        default Collection<GroupChannel> getGroupChannelsByNameIgnoreCase​(String name)
        Gets a collection with all server channels with the given name. This method is case insensitive!
        Parameters:
        name - The name of the group channels. Can be null to search for group channels without name.
        Returns:
        A collection with all group channels with the given name.