Table of Contents

Upgrade from 10.4.0 to 10.6.0

Important

We dropped support for .NET 5 in favor of newer features and major improvements in speed and stability.

We removed previously deprecated fields and methods.

We fixed a major bug with the gateway connection: Previously it wasn't actually applying the version, encoding, and compress fields, causing the gateway to use the default but deprecated version 6.

Warning

This release contains important bug fixes and improvements. We recommend you to upgrade to this version as soon as possible.

Note

With this version, we are re-opening issues on GitHub. We hope that everything goes well and we can keep them open. You can continue to use our Discord server for support tho.


Why weren't there any releases for a long time?

We've been focusing on rewriting internals and improving the library. Most of the changes were considered highly experimental and not ready for public use.

Other reasons were the lack of motivation to write changelogs 😅


What changed?


➕ Added Members field to DiscordRole.

➕ Added EnableEmoticons and GuildId to DiscordIntegration.

Sentry for automatic tracking of library errors and reporting new fields in API payloads.

Update check on startup for new library versions, configurable in DiscordConfiguration.

➕ New configuration field EnablePayloadReceivedEvent to work with raw events.

⚠️ Added ApiChannel enum in DiscordConfiguration; removed UseCanary & UsePtb.

Locale and Timezone settings in DiscordConfiguration.

➕ New methods and constructors for building DiscordOverwrite objects.

🛠️ Caching members now in DiscordGuild.GetAllMembersAsync().

SubCommandName & FullCommandName to BaseContext.

UnusualDmActivityUntil in DiscordMember.

➕ Incident configs and events on DiscordGuild.

🛠️ Group, subgroup, and subcommand creation for application commands along side each other.

➕ Added support for custom status.

DiscordOAuth2Client for OAuth2 API interaction.

➕ Support for iframe modals (Currently only midjourney has access to this).

➕ Pagination buttons constants for custom ids.

⚠️ Removed DiscordEmbedBuilder.AddField(string name, string value, bool inline); use DiscordEmbedBuilder.AddField(DiscordEmbedField field) instead.

🛠️ DiscordGuild.BanMemberAsync now supports DiscordUser as argument.

➕ New channel types and flags.

🛠️ Fixed standalone DiscordWebhookClient methods.

⚠️ Target of DiscordOverwriteBuilder changed to ulong.

⚠️ Removed Lavalink v1 support; added support for Lavalink v4.

➕ Support for premium apps in DiscordConfiguration.

➕ Various new permissions and options to generate PermissionStrings.

🛠️ Overhauled ApplicationCommands extension.

➕ Default values for select menus in interactions.

⚠️ Removed privacy level settings from stage and scheduled events.

➕ Added support for team roles from the developer portal.

⚠️ Removed ApplicationCommandRequireOwnerAttribute; added corresponding team role attributes like ApplicationCommandRequireTeamAdminAttribute. This adds support for the team roles in the developer portal.

🛠️ Opus encoder/decoder made public.

⚠️ Renamed DiscordAttachment.FileName to Filename.

➕ Exposed regexes in DisCatSharp.Common.

🛠️ Fixed application commands registration issues.

➕ Added support for application command names in other languages than english.

➕ Added support for GCP attachments.

🛠️ Major overhaul of the DisCatSharp documentation.


Why does this changelog look so small?

We've been focusing on rewriting internals and improving the library.

Furthermore we might have added new features we haven't tracked on our changelog list, we're gonna add them when we find them again 😅


Key Features


Sentry Integration

Every developer should at least have heard about Sentry.

They were so kind to provide us with a free business plan 🙏💕

With the integration of Sentry, we're taking a significant leap forward in proactively managing library errors.

Sentry's real-time error tracking enables us to identify and rectify issues swiftly, often before they impact users.

This enhancement is not just about fixing bugs faster; it's about ensuring a seamless and stable experience for everyone using our library.

To enable this feature and help us to improve our library, you need to set up some things in the DiscordConfiguration:

DiscordConfiguration configuration = new()
{
    // other settings
    EnableSentry = true, // To generally enable sentry
    AttachUserInfo = true, // To attach the bot id and username to sentry reports
    DeveloperUserId = 32183902178903721, // Set your Discord id here so we can reach out to you if we have questions to a bug. Set null or leave it out to disable this feature.
    FeedbackEmail = "[email protected]", // Set your email here so we can reach out to you if we have questions to a bug.
    ReportMissingFields = true // To let sentry report missing fields in API payloads
};

Update check on startup

We've added a new feature to check for new library versions on startup.

This feature is enabled by default and can be disabled in the DiscordConfiguration.

You can configure the update check with the following properties:

DiscordConfiguration configuration = new()
{
    // other settings
    DisableUpdateCheck = true, // To disable the update check on startup
    ShowReleaseNotesInUpdateCheck = false, // To disable the release notes in the update check on startup
    UpdateCheckMode = UpdateCheckMode.GitHub, // To check against GitHub instead of NuGet
    UpdateCheckGitHubToken = "ghp_your_token" // Set this to use a personal access token, in case you're getting rate limited or you have access to private extensions
};

Every official extension supports this too. You currently can't disable this feature seperatly for extensions.


Future Roadmap


DisCatSharp.Voice (Planned)

In the pipeline is DisCatSharp.Voice, set to replace the existing DisCatSharp.VoiceNext. This upcoming version is being designed for enhanced performance and stability in voice-related functionalities of Discord bots, particularly focusing on audio recording. While it promises an upgraded experience for integrating voice features in Discord bots, please note that details are subject to change as development progresses.

Caching System Overhaul (Under Consideration)

We're contemplating a major overhaul of our caching system, which plays a crucial role in data storage and management for optimized performance. The goal of this proposed rewrite is not just to boost efficiency and reliability but also to add flexibility in how data is handled. This might lead to the introduction of new features and methodologies for data storage and retrieval, though these plans are currently in a conceptual stage.

Audit Log Functionality Enhancement (In Development)

Plans are underway to revamp our approach to the Discord audit log API. The intended rewrite of the audit log implementation is aimed at enhancing its functionality and user-friendliness. Potential improvements could include more efficient event tracking, superior data management, and expanded logging capabilities. However, these enhancements are in the developmental phase and are subject to change.

DisCatSharp.CommandNext Revamp (Proposed)

We are proposing a complete rewrite of DisCatSharp.CommandNext, a module essential for handling text commands in Discord bots. This project aims to elevate the module's overall effectiveness, performance, and ease of maintenance. Anticipated improvements include new features and optimizations that could simplify the creation and management of commands. Please note that these plans are in the initial stages and may evolve.

Cooldowns for DisCatSharp.ApplicationCommands (Planned)

We are planning to add support for cooldowns in DisCatSharp.ApplicationCommands. This feature would allow developers to set cooldowns for commands, preventing users from spamming commands. While this feature is still in the planning phase, we will provide updates as development progresses.


Feedback and Community Engagement

Your input makes DisCatSharp better! We warmly invite our community to share feedback, suggestions, or even report bugs.

Engaging with us helps shape the future of DisCatSharp, ensuring it meets your 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 our community!


Contributors

Special Thanks

  • Dziurwa for identifying a major bug in our gateway connection
  • Red Kalab for being so awesome 💕💕