RestEntitySupplier
EntitySupplier that uses a RestClient to resolve entities.
Error codes besides 429(Too Many Requests) will throw a RestRequestException, 404(Not Found) will be caught by the xOrNull
variant and return null instead.
This supplier will always be able to resolve entities if they exist according to Discord, entities will always be up-to-date at the moment of the call.
Properties
Functions
Requests to get the information of the current application.
Requests an AutoModerationRule by its id.
Requests an AutoModerationRule by its id. Returns null
if it wasn't found.
Requests to get all AutoModerationRules currently configured for the Guild with the given guildId.
Requests guilds this bot is known to be part of.
Requests the GuildEmoji with the emojiId in the Guild wit the given guildId.
Requests the GuildEmoji with the emojiId in the Guild wit the given guildId, returns null when the emoji isn't present.
Requests the guild emojis of the Guild with the given guildId.
Requests to get all Entitlements for the Application with the given applicationId.
Requests a followup message for an interaction response.
Requests a followup message for an interaction response. Returns null
if the followup message isn't present.
Requests the GlobalApplicationCommand with the given id as type T.
Requests the GuildApplicationCommand with the given id as type T, returns null if the command application isn't present or if the channel is not of type T.
Requests the GlobalApplicationCommand with the given id as type T.
Requests the GlobalApplicationCommand with the given id as type T, returns null if the command application isn't present or if the channel is not of type T.
Requests the GuildApplicationCommand with the given id as type T.
Requests the GuildApplicationCommand with the given id as type T, returns null if the command application isn't present or if the channel is not of type T.
Requests the onboarding object for the Guild with the given guildId.
Requests the onboarding object for the Guild with the given guildId. Returns null
if it wasn't found.
Requests the preview of the guild matching the guildId. If the bot is not in the guild, then the guild must be lurkable.
Requests the preview of the guild matching the guildId. If the bot is not in the guild, then the guild must be lurkable. Returns null
if the preview was not found.
Requests to get the widget of a Guild with the given id, returns null if the GuildWidget isn't present.
Requests the Message with the given messageId in the MessageChannel with the given channelId.
Requests the initial interaction response.
Requests the initial interaction response, returns null
if the initial interaction response isn't present.
Requests the User this bot represents, returns null when the user isn't present.
Requests a Subscription by its id.
Requests a Subscription by its id. Returns null
if it wasn't found.
Requests to get all Subscriptions containing the Sku with the given skuId.