Important
I am not feeling well enough to continue the changelog at this time. Please refer for all changes to https://discord.com/channels/858089281214087179/976624429935251527 and the GitHub commit history. I am really sorry. I will update this as soon as I can.
Upgrade from 10.6.6 to 10.7.0
Important
This version introduces breaking changes. Please review carefully before upgrading.
Note
We added support for .NET 10.
Warning
This release contains important bug fixes and improvements. We recommend you to upgrade to this version as soon as possible.
Warning
Discord currently has an issue with entitlements for consumables and durables. Entitlements of these types are not returned in interaction events, only on the HTTP API. You can follow this issue for updates.
Change Highlights
This version now supports .NET 10 and includes a variety of new features, bug fixes, and improvements.
Some highlights include:
Components V2
With this version we officially release support for Components V2. Documentation will follow soon, it's not yet released by Discord.
All we can say it's amazing and will be fun to play with!
If you're already interested about how it works, you can check out my initial documentation here.
If you're using another library, you can check out the implementation status here.
Statistics
We added built-in statistics to the DiscordClient and DiscordShardedClient. This will help you to get some basic statistics about your bot.
This includes the number of guilds, channels, users and more.
Here's an example:
[SlashCommand("stats", "Statistics about the bot!"), DeferResponseAsync(true)]
public static async Task StatsAsync(InteractionContext ctx)
{
var statistics = HatsuneMikuBot.ShardedClient.Statistics;
var averagePing = (int)HatsuneMikuBot.ShardedClient.ShardClients.Values.Average(client => client.Ping);
DiscordEmbedBuilder builder = new();
builder.WithTitle("Stats");
builder.WithDescription($"Some stats about {ctx.Client.CurrentApplication.Name}!");
foreach (var (key, value) in statistics)
builder.AddField(new(key.ToString(), value.ToString().InlineCode(), true));
builder.AddField(new("Ping", $"{averagePing}ms".InlineCode(), true));
if (ctx.Client.VersionString.Contains('+'))
builder.AddField(new("Lib (Version)", $"{ctx.Client.BotLibrary}@{ctx.Client.VersionString}".MaskedUrl(new($"https://github.com/Aiko-IT-Systems/DisCatSharp/tree/{ctx.Client.VersionString.Split('+').Last()}")), true));
else
builder.AddField(new("Lib (Version)", $"{ctx.Client.BotLibrary}@{ctx.Client.VersionString}".MaskedUrl(new($"https://github.com/Aiko-IT-Systems/DisCatSharp/tree/v{ctx.Client.VersionString.Trim()}")), true));
builder.AddField(new("API Channel (Discord)", ctx.Client.ApiChannel.ToString().InlineCode(), true));
builder.AddField(new("API Version (Discord)", ctx.Client.ApiVersion.InlineCode(), true));
var lavalinkDefaultSession = ctx.Client.GetLavalink()?.DefaultSession();
if (lavalinkDefaultSession is not null)
builder.AddField(new("Lavalink Version", $"{await lavalinkDefaultSession.GetLavalinkVersionAsync()}".InlineCode(), true));
builder.WithThumbnail(ctx.Client.CurrentUser.AvatarUrl);
if (ctx.Client.CurrentUser.BannerUrl is not null)
builder.WithImageUrl(ctx.Client.CurrentUser.BannerUrl);
await ctx.EditResponseAsync(new DiscordWebhookBuilder().AddEmbed(builder.Build()));
}
Stability Improvements
We fixed some issues with the gateway connections and close code handling to improve the stability of the library.
DisCatSharp.Voice
DisCatSharp.Voice shipped as the new voice implementation, replacing DisCatSharp.VoiceNext.
Highlights:
- Full Discord voice transport (send and receive)
- DAVE end-to-end encryption support via
libdave(MLS-backed ratchets) - New runtime diagnostics and voice events for state and packet observability
- Native runtime package:
DisCatSharp.Voice.Natives
RoleType
We recently added RoleType to DiscordRole. This is meant to determine the type of role in an easier way.
Discord does not support this directly, it's a library side thing.
Important to note: Discord's RoleTags object is unstable and has changed multiple times over recent weeks.
In our best effort we tried to patch it over and over again, but we can't guarantee that this will work in the future.
What changed?
❕ Breaking Changes
- DiscordAttachment: Renamed
MediaTypetoContentTypeto align with Discord's API. - DiscordTextComponent: Switched the position of
customIdandlabelbecause of nullability. - Application Commands: Removed
dmPermissionfields, causing DisCatSharp to do weird bulk-updates. UseallowedContextsinstead. - LavalinkGuildPlayer:
RemoveQueuerenamed toRemoveFromQueue. - Url fields: Any
Urlfields on objects likeDiscordAttachment,DiscordEmbed, etc., are now of typeDiscordUriinstead ofstring. Use.ToUri()to get aUriobject or use.ToString(). - We updated some namespaces in DisCatSharp.Interactivity. You might need to update your imports for some entities and enums.
- Flags are now of the type
longinstead ofint. - Renamed some flags in
ApplicationFlagsandUserFlagsto be more consistent with Discord's API. - Removed
EntitlementSkuIdsfrom interaction entities. Discord removed this field from the API. UseEntitlementsinstead.
➕ Additions
Added Entities
Added Enums
RoleType.PremiumSubscriberTierDraftRoleType.ExternalPlatformOrPremiumSubscriberDisCatSharpStatisticType
Added Properties
DiscordClient.ApiChannelDiscordClient.ApiVersionDiscordClient.StatisticsDiscordShardedClient.ApiChannelDiscordShardedClient.ApiVersionDiscordShardedClient.StatisticsDiscordGuild.SoundboardSoundsDiscordEmoji PaginationEmojis.LeftDiscordEmoji PaginationEmojis.RightDiscordEmoji PaginationEmojis.SkipLeftDiscordEmoji PaginationEmojis.SkipRightDiscordEmoji PaginationEmojis.Stopbool DiscordSignedLink.IsSignedOptional<bool> DiscordRoleTags.IsGuildProductRolestring? DiscordUnfurledMedia.ContentType
Added Enum Values
Added Methods
DiscordClient.ConsumeEntitlementAsyncDiscordClient.CreateTestEntitlementAsyncDiscordClient.DeleteTestEntitlementAsyncDiscordEntitlement.ConsumeAsyncDiscordEntitlement.DeleteTestEntitlementsAsyncDiscordSku.GetSubscriptionsAsyncDiscordSku.GetSubscriptionAsyncDiscordSku.CreateTestEntitlementAsyncDiscordGuild.GetMemberVoiceStateAsyncLavalinkGuildPlayer.GetLyricsAsyncLavalinkGuildPlayer.SeekAsyncLavalinkGuildPlayer.AddToQueueAtLavalinkGuildPlayer.RemoveFromQueueAtLavalinkGuildPlayer.RemoveFromQueueAtRangeLavalinkGuildPlayer.SetRepeatModeLavalinkSession.GetLyricsAsyncstring.SubtextDiscordButtonComponent.WithIdDiscordLinkButtonComponent.WithIdDiscordPremiumButtonComponent.WithIdDiscordActionRowComponent.WithIdDiscordChannelSelectComponent.WithIdDiscordMentionableSelectComponent.WithIdDiscordRoleSelectComponent.WithIdDiscordStringSelectComponent.WithIdDiscordUserSelectComponent.WithIdDiscordTextDisplayComponent.WithIdDiscordContainerComponent.WithIdDiscordFileDisplayComponent.WithIdDiscordMediaGalleryComponent.WithIdDiscordSectionComponent.WithIdDiscordSeparatorComponent.WithIdDiscordTextDisplayComponent.WithIdDiscordThumbnailComponent.WithId- DiscordGuild.ModifyCurrentMemberAsync
Voice Subsystem
DisCatSharp.Voice— New Discord voice implementation replacingDisCatSharp.VoiceNext. Includes DAVE end-to-end encryption, audio send/receive, and alibdave-based MLS backend. Voice APIs now live underDisCatSharp.Voice(VoiceConnection,VoiceConfiguration,VoiceExtension).DisCatSharp.Voice.Natives— Native asset package shippinglibdave,libopus, andlibsodiumfor Windows (x64), Linux (x64/arm64), and macOS (x64/arm64).
🛠️ Fixes
- Fixed naming on
DiscordClient:CreateTestEntitlementsAsyncrenamed toCreateTestEntitlementAsyncandDeleteTestEntitlementsAsyncrenamed toDeleteTestEntitlementAsync. - Fixed the
Recalculatefunction for interactivity pages. - Fixed issues with the
DiscordOAuth2Client. - Fixed issues when using the
OAuthWebextension to add users to a guild. - Fixed invalid API routes for
UpdateCurrentUserApplicationRoleConnectionAsyncandGetCurrentUserApplicationRoleConnectionAsync. - Fixed the nullability annotations for some entities.
⚠️ Removals
- Removed
ApplicationCommandRequirePremiumAttribute. DisCatSharp.VoiceNext— Removed. Replaced byDisCatSharp.Voice. See the Migration Guide.DisCatSharp.VoiceNext.Natives— Removed. Replaced byDisCatSharp.Voice.Natives.
📚 Documentation
- Added missing documentation for public code.
- Documented more internal and private code to make library development easier.
Future Roadmap
Audit Log Functionality Enhancement (Next Up)
We want to revamp how we implement the Discord audit log API. This will enhance the functionality and ease-of-use. The enhancements we are planning are still in the developmental phase and might change.
Caching System Overhaul (On Hold)
A major overhaul of our caching system is planned. The goal of this proposed rewrite is to increase reliability, performance and to add flexibility in how data is stored and retrieved. We are still in the conceptual stage for this.
DisCatSharp.CommandNext Revamp (Proposed)
A complete rewrite of DisCatSharp.CommandsNext is proposed. We want to rewrite this for improved maintainability and for potential performance and usability improvements.
Feedback and Community Engagement
Your input makes DisCatSharp better! We warmly invite you to share feedback, suggestions, or report bugs.
Talking to us helps shape the future of DisCatSharp, ensuring it meets everyone's needs and expectations.
- Join the Conversation: Have ideas or questions? Join our Discord community to discuss features, get help, or just chat with fellow developers.
- Contribute: Interested in contributing? Check out our GitHub repository to see how you can contribute code, documentation, or report issues.
- Stay Updated: Follow our news channel on Discord to stay up to date on the latest developments.
Your involvement is invaluable to us, and we look forward to growing and improving DisCatSharp together with you and everyone else!