- Support for application command context types
- Upgraded Kotlin to 2.0.0
- Upgraded to kotlinx.serialization 1.7.0
- Interaction commands defined by the commands DSL should now accept changes for more fields.
- Updated Gradle to 8.7 and changed dependency management to leverage Gradle version catalogs
- Updated Kotlin to 1.9.23 / Dokka to 1.9.20
- Updated Ktor to 2.3.11
- Updated kotlinx.coroutines to 1.8.1
- Updated kotlinx.datetime to 0.6.0
- Updated SLF4J to 2.0.13
- User display name
- User banner image hash
- User accent colors
- User avatar decoration
- Support for configuring the HttpClient used
- Upgraded to Kotlin 1.9.21
- Upgraded to kotlinx.datetime 0.5.0
- Upgraded to Ktor 2.3.7
- Upgraded to kotlinx.serialization 1.6.2
- Fix issue where MessageComponent.Data.values is not always present
- Support for message components in slash command responses
- Slash command parameters not properly nullable
- Support for sending messages with message components
- Interaction module now supports
commandGroup
command type, with childrensubgroup
andslashCommand
- Interaction module upgraded with breaking API changes to support a cleaner developer experience
- See the JVM Bot Demo for an example of the updated API
- See also the updated ResponseContext for functions and properties available within an interaction response
- Kotlin upgraded to 1.9.0
- Ktor upgraded to 2.3.2
- kotlinx.coroutines upgraded to 1.7.2
- Bug where the interactions module ran into rate limits far more often than it should
EmbedProvider
not defaulting url to null when missing
timestamp(Instant, TimestampFormat)
andInstant.toTimestamp(TimestampFormat)
functions which format Instants for relative display to each userkotlinx.datetime
is now an api dependency and accessible to developers as a transitive dependency
- Fixed a bug in deserializing command options
- Completed the Interactions API
- Synthetic
onInit
event which runs once at the start of the bot lifecycle
- Various API improvements and bug fixes
- Interactions API!
- Fallback behavior for enum values to have unknown types
- Updated nearly all the dependencies
- Expect breaking changes to some APIs
- Removed deprecated APIs
- An issue where a new message type, CONTEXT_MENU_COMMAND, was missing
- Updated to kotlin 1.6.20 and related dependencies
- An issue where colors were not always calculated accurately
- Updated to kotlin 1.6.10 and related dependencies
- Changed behavior to bot startup so that it blocks until connection is established
- Two issues related to rate limiting
- Added missing content_type field to Attachments
- Added logging around rate limits and API exceptions
The following minor breaking changes have been made:
Guild.region
has been removed from the Discord API v9 (it has been replaced withChannel.rtcRegion
)Channel.rateLimitPerUser
has been marked as nullable to support threads (as per the Discord API)- Fixed incorrectly named methods:
Guild.updateChannel
->Guild.updateGuild
,Guild.deleteChannel
->Guild.deleteGuild
- Added support for stickers
- Added support for threads
- Added support for interactions and slash commands
- Added extensions for sending embedded replies
- Added missing enums to
GuildFeatures
- JavaScript module now supports both Legacy and IR backends
FileData
now supports specifying a content type (this is required for sticker uploads)Permission.MANAGE_EMOJIS
has been deprecated in favor ofPermission.MANAGE_EMOJIS_AND_STICKERS
GatewayIntent.GUILD_EMOJIS
has been deprecated in favor ofPermission.GUILD_EMOJIS_AND_STICKERS
MessageSticker
has been deprecated in favor ofSticker
Message.stickers
has been deprecated in favor ofMessage.stickerList
WebhookSubmission
has been deprecated in favor ofCreateWebhookMessage
WebhookClient.execute
usingWebhookSubmission
has been deprecated in favor of a new variant which usesCreateWebhookMessage
and returnsMessage
WebhookClient.updateWebhookMessage
usingWebhookSubmission
has been deprecated in favor of a new variant which usesPatchWebhookMessage
- Simplified
BotContext
reply extensions so that embeds are optional parts ofreply
rather than their own distinctreplyEmbed
- Updated kotlin to 1.5.30
- Updated kotlinx.serialization to 1.2.2
- Updated ktor dependency to 1.6.3
- Fixed an issue where emoji updates may not have been received
- Fixed incorrect permissions mask for VIEW_GUILD_INSIGHTS
Permissions
now usesLong
for internal bitmask representation
Experimental support for JavaScript IR target
Upgrade to kotlin 1.5.20
- Fixed an issue where rate limit errors might overly aggressively retry
It is recommended to read through the documentation as this is essentially a complete rewrite with a new API, new artifacts, and new usage
- Added multiple API endpoints which were missing
- New Bot DSL framework
- Separated into two artifacts
diskord-core
which contains the core REST API and Gateway implementationdiskord-bot
which contains the high level DSL and utilities
- New DSL
diskord-bot
ships with a simple logger implementation by default- New interface with the gateway
- REST clients are now backed by a shared
RestClient
which manages rate limits across requests more intelligently - Updated audit logging to automatically translate JSON into concrete classes
- The Command DSL is now the Classic Command DSL, as we develop a new Command DSL using the slash command API
- The Classic Command DSL now passes messages as
it
instead ofthis
- Old experimental DSL
DiscordGateway
- Added support for gateway intents.
- Fixed an issue with
GuildClient.createBan
not sending the correct request - Added
CreateGuildBan
to holdGuildClient.createBan
JSON payload
- Fixed the CDN domain after Discord decided not to migrate the CDN
- Fixed an issue where the user agent reported the wrong version
Addressed an issue where the GuildClient.updateMember
method did not allow disconnecting
a guild member from voice channels.
The solution is the addition of GuildClient.disconnectMemberVoiceChannel
which under the hood performs the same API
request but only disconnects members from voice.
- Updated kotlinx.coroutines to 1.3.8
Fixed an issue where unusually large API response bodies broke deserialization
Addressed an issue where ktor does not close the receiving channel of the websocket client when the connection closes
Ktor has been updated to the 1.3.x release. This update merges an external dependency, which resulted in a package name change. If you are using the FileData object with a raw byte packet, then make sure to update the following packages:
import kotlinx.io. -> import io.ktor.utils.io.
import kotlinx.coroutines.io. -> import io.ktor.utils.io.
- Added missing property in GuildCreated event payload
- Added default value for nick property in GuildMemberUpdate event payload
- Upgraded to Kotlin 1.3.71
- Added @DiskordInternal annotation to internal APIs which should be avoided
- Switched to a stable JSON configuration from kotlinx.serialization
- Updated dependencies
- Removed transitive dependency on jcenter
- Updated audit events to match changes to the API
- Soft locking on connection issues
- An issue where updating GuildMembers would fail on serialization
- Added emoji field to
UserStatusActivity
to support custom statuses
- Added exponential backoff to websocket connections to avoid session limits when there are connection issues with the API
- Deserialization of Unicode emoji failing due to null id
- Discord API issues causing Diskord to soft crash
- Very simple bot example
- Very simple command DSL example
- Simplified gradle setup, due to gradle features graduating
- Updated dependencies
- Updated Dokka
- Fixed webhook patching responses not parsing json correctly
- Added api to upload files
- Updated dependencies
- Using kotlin 1.3.50
Note: Several classes and constants have been re-arranged in the com.jessecorbett.diskord.api.rest.client.internal
package to help facilitate better testing. Any code depending on these changes will break. It is highly recommended
not to depend on any code marked with the @DiskordInternals
annotation in the future, as we provide no guarantee
that this code will not be changed between releases, even between minor or patch releases.
- Added @DiskordInternals annotation to mark internal APIs.
- REST clients have been refactored to better support testing. This may break client code depending on Diskord internal code.
- Updated Kotlin version to 1.3.41
- Updated ActivityType enum
- Updated ktor version
- Updated kotlin version to 1.3.40
- Removed deprecated kotlinx.serialization @Optional annotation
- Update Gradle build with Kotlin DSL & updates to publish to Maven instead of Bintray (to fix publishing issues)
- Changed artifact path for jvm build from
diskord
todiskord-jvm
, introducingdiskord
as the multiplatform artifact - Migrated backend to ktor multiplatform, allowing diskord to be built out for other platforms
- Fixed a bug where
ChannelClient.getMessageReactions
function invoked with a String containing a unicode emoji was indefinitely hanging - Fixed a bug where both
ChannelClient.getMessageReactions
functions were returning the incorrect type
- Fixed a bug where Emoji had a list of Role models instead of ids
- Ported internal structure to be a multiplatform project
- Ported to kotlinx.serialization from jackson
- Added a typealias
Color
forInt
to be used in embeds and roles. - Added object
Colors
, providing a list of predefinedColor
values, as well as conversion functions for RGB and hex values.
- SNAPSHOT builds now maintain same naming scheme as release builds, remain in gitlab packages repository.
Message.delete
andMessageUpdate.delete
extension functions will now filter outDiscordNotFoundExceptions
as they are not meaningful exceptions in that scenario.
- Gradle CI/CD build has been optimized.
- Initial project and architectural changes have begun for migrating to a multiplatform project.