- Fixed voice IP discovery.
- Discore now targets .NET 6.0.
- Discord entities (such as
DiscordMessage
) no longer keep a reference to aDiscordHttpClient
internally and therefore no longer have methods for modifying the entity.- All removed methods were just shortcuts for
DiscordHttpClient
calls and can be migrated by just using aDiscordHttpClient
instead (ex.DiscordMessage.Edit()
->DiscordHttpClient.EditMessage(DiscordMessage)
).
- All removed methods were just shortcuts for
- Caching breaking changes:
DiscordShardCache
has been replaced with the newDiscore.Caching.DiscordMemoryCache
.Shard.Cache
was removed in favor of making caching optional for Gateway connections. To get built-in caching behavior back, instantiate the newDiscordMemoryCache
with yourShard
. The newDiscordMemoryCache
object has a nearly identical interface to the oldDiscordShardCache
.- DM channels are no longer cached since the Gateway no longer sends 'Channel Create' events for DMs as of v8.
IDiscordGateway
breaking changes:- Events have been renamed to be more consistent. All new event names follow the pattern
OnEventName
(e.g.OnMessageCreated
was renamed toOnMessageCreate
). - Events now emit unique event args per event instead of some events sharing arg types (arg class names now follow the pattern
EventNameEventArgs
). OnMessageUpdated
now emits aDiscordPartialMessage
instead of a normalDiscordMessage
.OnGuildAvailable
andOnGuildUnavailable
were merged intoOnGuildCreate
andOnGuildDelete
. To see whether the guild availability status changed, use the newBecameAvailable
andUnavailable
properties in the event args.OnDMChannel*
events were removed (bots no longer receive events for DM channels as of Gateway v8).OnChannel*
events now emit aDiscordChannel
instead of aDiscordGuildChannel
(matches the actual Gateway spec).UpdateStatusAsync
was renamed toUpdatePresenceAsync
.
- Events have been renamed to be more consistent. All new event names follow the pattern
- Voice breaking changes:
- Voice connections are now decoupled from
Shard
instances. - Removed
DiscordVoiceConnection.Shard
. - Removed
ShardVoiceManager
(use the newDiscordVoiceConnection
constructors instead). - Removed
VoiceConnectionEventArgs.Shard
. - Removed
VoiceConnectionInvalidationReason.BotRemovedFromGuild
(this case is now just a normal invalidation). - Removed
Shard.Voice
.
- Voice connections are now decoupled from
Shard.StartAsync
now requires either aGatewayIntent
orShardStartConfig
argument.- Renamed
DiscordGame
toDiscordActivity
(to match Gateway v8 changes). - Renamed
DiscordGameType
toDiscordActivityType
(to match Gateway v8 changes). - Removed
DiscordUserPresence.Game
(useActivities.FirstOrDefault()
instead). - Renamed
StatusOptions
toPresenceOptions
.PresenceOptions
now takes a list of activities instead of a singleGame
.
- Renamed
GameOptions
toActivityOptions
. DiscordVoiceConnection.SetSpeakingAsync
will now throw anInvalidOperationException
if called before being fully connected.DiscordVoiceConnection.ClearVoiceBuffer
will now throw anInvalidOperationException
if called before being fully connected.DiscordVoiceConnection.ConnectAsync
no longer checks if the application is allowed to join the voice channel. If the application is not allowed to join the connection will still fail, but it will be attempted.- To get this functionality back, please use the new
DiscordPermissionHelper.CanJoinVoiceChannel
helper function.
- To get this functionality back, please use the new
DiscordHttpRateLimitException.Limit
is now nullable.DiscordHttpRateLimitException.Reset
is now nullable.DiscordHttpRateLimitException.ResetHighPrecision
is now nullable.ShardStartConfig.GatewayLargeThreshold
now defaults to the Gateway's default of 50 (down from 250).DiscordHttpErrorCode.TooManyReactions
renamed toMaximumReactionsReached
.DiscordHttpRateLimitException.RetryAfter
is now adouble
and includes millisecond precision.- Guild embeds are replaced with guild widgets (API v8 change):
- Removed
DiscordGuild.IsEmbedEnabled
andEmbedChannelId
(useIsWidgetEnabled
andWidgetChannelId
instead). - Renamed
DiscordGuildEmbed
toDiscordGuildWidgetSettings
. - Renamed
DiscordHttpErrorCode.EmbedDisabled
toWidgetDisabled
. - Renamed
ModifyGuildEmbedOptions
toModifyGuildWidgetOptions
. - Renamed
DiscordHttpClient.GetGuildEmbed
toGetGuildWidget
. - Renamed
DiscordHttpClient.ModifyGuildEmbed
toModifyGuildWidget
.
- Removed
- Removed deprecated
ShardFailureReason.IOError
DiscordHttpClient.BeginGuildPrune
now returns null ifcomputePruneCount
is true.- Renamed
Create/EditMessageOptions.Embed
toEmbeds
to support multiple embeds per message. DiscordHttpClient.Create/EditMessage
file attachment overloads have been removed. Instead, please use the newAttachments
property ofCreate/EditMessageOptions
.- Removed
DiscordHttpClient.UseSingleHttpClient
(it's no longer needed). - Removed deprecated
DiscordHttpClient.GetUserDMs
. Shard.OnReconnected
is now fired at the end of reconnection (as probably expected), rather than the start. This is still guaranteed to be fired beforeOnReady
.Create/ModifyGuildOptions.VerificationLevel
is now typeGuildVerificationLevel
.Create/ModifyGuildOptions.DefaultMessageNotifications
is now typeGuildNotificationOption
.- Removed deprecated/removed
DiscordVoiceRegion
properties (SampleHostname
,SamplePort
,IsVIPOnly
). DiscordEmbed.Color
is now typeDiscordColor
.- Renamed
DiscordUser.HasTwoFactorAuth
toMfaEnabled
. DiscordIntegration.ExpireBehavior
is typeIntegrationExpireBehavior
.DiscordInvite
changes:- Renamed
TargetUserType
toTargetType
. Channel
is now nullable.Inviter
is now a property ofDiscordInvite
instead ofDiscordInviteMetadata
(should only break reflection).
- Renamed
- Removed
DiscordInviteMetadata.IsRevoked
. - Renamed
DiscordInviteChannel.ChannelId
toId
. - Renamed
DiscordInviteGuild.GuildId
toId
. - Renamed
DiscordInviteTargetUserType
toDiscordInviteTargetType
. - Removed
ShardVoiceManager.GetUsersInVoiceChannel
(please useDiscordMemoryCache.GetUsersInVoiceChannel
instead). - Removed
DiscordGuild.RegionId
(deprecated). - Removed
DiscordPermissionException
(was no longer thrown from any normal APIs). - Removed
DiscordPermissionHelper.AssertPermission
(applications should make their own assert helpers usingHasPermission
).
- Added support for creating and editing messages with multiple embeds and/or multiple attachments.
- Added support for Gateway intents.
- Intents can be specified using
ShardStartConfig.Intents
orShard.StartAsync(GatewayIntent)
.
- Intents can be specified using
- Added
Create/EditMessageOptions.Flags
. - Added
DiscordAttachment.Description
. - Added
DiscordAttachment.ContentType
. - Added
DiscordAttachment.Ephemeral
. - Added
Shard.OnDisconnected
. - Added
ShardFailureReason.InvalidIntents
. - Added
ShardFailureReason.DisallowedIntents
. - Added
DiscordHttpApiException.Errors
. - Added
DiscordHttpRateLimitException.Bucket
. - Added
DiscordVoiceConnection.SetSpeakingAsync
overload to take newSpeakingFlag
parameter for more specific speaking states. - Added
DiscordVoiceConnection
constructors for creating a connection from a shard or a voice bridge. - Added a
DiscordVoiceConnection.ConnectAsync
parameter for changing the connection timeout period. - Added
IDiscordGateway.OnVoiceServerUpdate
event. - Added
IDiscordGateway.UpdateVoiceStateAsync
. - Added
MemberSpeakingEventArgs.SpeakingFlag
. - Added
DiscordMessage.GuildId
. - Added
IDiscordGuildMember
base interface. - Added more flexible
DiscordPermissionHelper.HasPermission
overload. - Added
DiscordPermissionHelper.CanJoinVoiceChannel
. - Added
DiscordPermissionHelper.PermissionsToString
. - Added
VoiceConnectionInvalidationReason.DllNotFound
.
- Discore now fully annotates nullable reference types!
- Discore now supports Discord API/Gateway v10.
- Discore now supports voice Gateway v4.
DiscordGuildVoiceChannel
now implementsITextChannel
to support guild voice text chat.Snowflake
now implementsIEquatable<Snowflake>
.DiscordCdnUrl
now implementsIEquatable<DiscordCdnUrl>
.- Removed dependency on
Newtonsoft.Json
.
- Fixed race condition that occurred when the application is kicked from a voice channel.
- Fixed
DiscordWebSocketException
not containing anInnerException
when one was provided. - Miscellaneous internal bug fixes found thanks to nullable reference type annotations.