v4.0.0
The newest major release of Discore is finally here! Thankfully this release includes far fewer breaking changes than the jump from 2.x to 3.x. Version 4 includes all of the recent major additions and changes made to the Discord API as well as completed support for the v6 WebSocket API.
Breaking Changes
Support For API v6 Channel Types
Discore v4 brings support for the new way channels are represented by the Discord API. This changes DiscordChannelType
to contain all channel types, and removes DiscordGuildChannelType
since it is no longer necessary.
Migrating usage of these enums should be pretty simple as it just changes references from DiscordGuildChannelType.Text
to DiscordChannelType.GuildText
for example.
- Changed
DiscordChannelType
values to:GuildText
,DirectMessage
,GuildVoice
, andGuildCategory
. - Removed
DiscordGuildChannelType
.
More Support For Bot Statuses
Instead of IDiscordGateway.UpdateStatusAsync
taking the name of the game and the idle time of the bot, the method now takes a StatusOptions
object which contains even more options for setting a bot's status. This allows Discore to add new properties for updating status without changing the method signature from now on.
- Changed
IDiscordGateway.UpdateStatusAsync(string, int?, CancellationToken?)
toIDiscordGateway.UpdateStatusAsync(StatusOptions, CancellationToken?)
.
Discore Now Targets .NET Standard 1.5
While realistically this shouldn't break any applications using Discore, this does allow a wider audience of platforms to use Discore.
Support For All CDN Resource Types
Discore's CDN helper object now supports all resources exposed through Discord's CDN (rather than just user avatars, guild icons, and guild splashes). Unfortunately this required some breaking changes to be implemented cleanly.
- Changed
DiscordCdnUrlType
values to:CustomEmoji
,GuildIcon
,GuildSplash
,DefaultUserAvatar
,UserAvatar
, andApplicationIcon
. DiscordCdnUrl
is now constructed from static methods.DiscordCdnUrl.ResourceId
is now nullable (for default user avatar support).- Renamed
DiscordCdnUrl.Hash
toFileName
.
Miscellaneous
- Renamed
GuildMfaLevel.Disabled
toNone
(to match official docs). - Renamed
GuildMfaLevel.Enabled
toElevated
(to match official docs). - Renamed
DiscordHttpClient.CreateWebook
toCreateWebhook
(spelling mistake fix). - Renamed
DiscordHttpClient.GetWebook
toGetWebhook
(spelling mistake fix). - Renamed
DiscordHttpClient.GetWebookWithToken
toGetWebhookWithToken
(spelling mistake fix). - Renamed
DiscordHttpClient.ModifyWebook
toModifyWebhook
(spelling mistake fix). - Renamed
DiscordHttpClient.DeleteWebook
toDeleteWebhook
(spelling mistake fix). - Renamed
DiscordHttpClient.DeleteWebookWithToken
toDeleteWebhookWithToken
(spelling mistake fix). - Renamed
DiscordHttpClient.ExecuteWebook
toExecuteWebhook
(spelling mistake fix).
Additions
Guild Category Channel Support
Discore now supports the new guild categories via the DiscordGuildCategoryChannel
type. In addition, DiscordGuildTextChannel
and DiscordGuildVoiceChannel
now have a ParentId
property for referencing which category these channels are in.
- Added
DiscordGuildCategoryChannel
. - Added
DiscordHttpClient.ModifyCategoryChannel
. - Added
DiscordShardCache.GetGuildCategoryChannel
. - Added
DiscordGuildVoiceChannel.ParentId
. - Added
DiscordGuildTextChannel.ParentId
. - Added
GuildVoiceChannelOptions.ParentId
. - Added
GuildTextChannelOptions.ParentId
. - Added
CreateGuildChannelOptions.ParentId
.
Support For Emoji HTTP Endpoints
Discore has supported guild emojis through the DiscordEmoji
entity, but recently Discord has documented HTTP endpoints for manipulating them. With version 4, users can now create and modify guild emojis.
- Added
DiscordHttpClient.ListGuildEmojis
. - Added
DiscordHttpClient.GetGuildEmoji
. - Added
DiscordHttpClient.CreateGuildEmoji
. - Added
DiscordHttpClient.ModifyGuildEmoji
. - Added
DiscordHttpClient.DeleteGuildEmoji
. - Added
DiscordEmoji.UserId
.
Miscellaneous
- Added
DiscordGuildTextChannel.Nsfw
. - Added
GuildTextChannelOptions.Nsfw
. - Added
CreateGuildChannelOptions.Nsfw
. - Added
DiscordMessage.Type
as aDiscordMessageType
enum. - Added
DiscordHttpClient.ModifyWebhookWithToken
. - Added
DiscordWebhook.ModifyWithToken
. - Added
channel_id
parameter toModifyWebhook
(allows users to move webhooks between channels). - Added
GuildVoiceChannelOptions.PermissionOverwrites
. - Added
GuildTextChannelOptions.PermissionOverwrites
. - Added pagination parameters for
DiscordHttpClient.GetReactions
. - Added
DiscordHttpErrorCode.MaximumGuildChannelsReached
.
Changes
Voice Connections Now Automatically Resume
Similar to Gateway connections, voice connections in Discore will now automatically reconnect when possible. While this is infrequently necessary, it will keep voice connections alive during events such as voice servers crashing.
Bug Fixes
- Fixed major bug that caused voice connections to not work with many voice servers.
- XML documentation is now generated again.
- Fixed the
deleteMessageDays
argument not working forDiscordHttpClient.CreateBan
(and the shortcut methods referencing it). webhook_id
is now treated as a major HTTP parameter (removes unnecessary delays when interacting with multiple webhooks simultaneously).
NuGet
Version 4.0.0 can be downloaded via NuGet here.