v10.0.25 release
Coroutines are here!
🆕 This release comes with the active support of the coroutine features! New with C++20, coroutines are a great way to simplify asynchronous programs, removing the need for callbacks: check out the docs for more information. With them you can also easily do things that were previously very complex, for example assigning an action to a button on the spot!
You will need to build D++ from source and use the option -DDPP_CORO=on
in your CMake command.
Your application also needs to enable C++20 and define DPP_CORO
, by using:
-std=c++20 -DDPP_CORO
in your build command if building manually, or- if using CMake, add
target_compile_definitions(my_program PUBLIC DPP_CORO)
andtarget_compile_features(my_program PUBLIC cxx_std_20)
.
⚠ Currently, coroutines are supported on g++11 and above, clang14 and above, and MSVC 19.37 and above. Note that g++11 and g++12 have a compiler bug with lambdas, which is fixed in g++13 (workaround described in one of the examples).
Note that this feature is still new and may have bugs and crashes, please report any to our GitHub or to our Discord server. Feel free to ask for support in the latter as well!
We hope you enjoy, and we will be co_awaiting your feedback!
We have also added support for AVX, AVX2 and AVX512 for mixing audio streams, when you receive audio from many discord users into one stream. This will improve the performance of mixing by many factors if you have a processor that can support it; as of right now, this is 64 bit Intel/AMD machines with plans to support ARM NEON.
We will also be joining the google os-fuzz and are to be considered as a critical infrastructure project - this means that you can expect even more stable releases from us, as well tested as ever and then some!
Release Changelog
💣 Breaking Changes
- Remove
co_attach
& enforce event handler call semantics (return void/dpp::job
, take const event) (#807)
✨ New Features
- Coro: more stuff! not breaking this time! (#813)
- Coro:
dpp::task::cancel()
, lock-freedpp::task
- Coro: coroutine, a lightweight synchronized coroutine object
- Coro:
dpp::job
, a lightweight async coroutine - Added
dpp::utility
::guild_navigation
helper (#810) - Updated the reaction struct for super reactions (#811)
- Application team member roles feature (#805)
- Build: add off-by-default
DPP_USE_PCH
option in CMake (#793) - Coroutines "beta test" (#763)
- Added can and
can_any
methods todpp::permission
class (#776) - Added commonly user terms (#718)
- Add SPDX-License-Identifier to headers in files
- Introduce the media channel type (#746)
- Adding AVX implementation for mixing audio. (#745)
- Add STDCORO to cspell
- Add
dpp::snowflake::str()
that returns string form of snowflake value - Added functionality for guild onboarding and welcome screen (#734)
- Add
bool
is_coro_enabled()function to
dpp::utility` namespace (#737) - Add flags and
is_remix()
todpp::attachment
(#727) - Added role flag
IN_PROMPT
(#728) - Coroutines, still experimental but useable (#724)
- Added
message_author_id
field tomessage_reaction_add_t
event (#730) - Add missing audit log events (#729)
- Add missing audit log events:
CREATOR_MONETIZATION_REQUEST_CREATED
,CREATOR_MONETIZATION_TERMS_ACCEPTED
- Add .clang-tidy for linting rules (#726)
cluster::interaction_followup_get_original
(#723)- Add
embed::set_colour()
, alias ofset_color
with correct spelling - Add files via upload
- Added setter methods to
dpp::invite
class (#708) - Added
global_name
todpp::user
(#712) - Added user field to
dpp::invite
(#698) - Added the
USE_EXTERNAL_SOUNDS
permission (#701)
🐞 Bug Fixes
- Avx on raspberry pi 4 didnt build (#823)
- Broken emoji symbol names (#822)
- Fix unicode symbol name for piñata, and also make constexprs inline
- Fix malformed emoji symbol names
-1
,+1
andnew
, useunicode_emoji
namespace in unit tests instead of hard coded emoji content - Silence a client event we arent supposed to receive
unicode_emoji.h
now compiles properly (#806)- Update to change the accepted system processor types. (#819)
- Update
DetectArchitecture.cmake
to only search for required CPU-flags. (#816) - Dont try to enable AVX on ARM (or any non
x86_64
/x86 arch) (#815) - Fixed
cluster::guild_create
,cluster::stage_instance_create
andcluster::sticker_packs_get
returning 404 Not Found (#809) - Make cmakelists use the correct AVX2 instruction (#786)
- Fix
discordevents.cpp
exports on Windows (#781) - Don't allow user to change ws mode on a connected cluster (this would be bad) (#778)
- Fix various issues and bugs with
dpp::emoji
(#775) - Accidentally removed the preamble from the DCO, we arent allowed to do this - i put it back
- Fix dodgy search and replace, vscode inserting newlines
default
empty destructors- Delete copy and move assignment operators for cluster
- Workaround gcc-12 bug #105329 (#748)
- Uninitlized
overshoot_accumulator
in voice timers - Coroutines: better support for clang, remove experimental if unneeded, add missing headers (#743)
- Warning for [=] copy without explkit , rerun coro builder for onboarding
- Add /bigobj to non-VCPKG MSVC CMake flags, fixing ninja build, and fix
CMakeSettings.json
(#740) user::format_username
now returns theglobal_name
if it's set (#733)- Fix header, add emoji gen
- Force
dpp::to_hex
to usestd::locale
::classic for formatting (#725) - Added
cluster::thread_edit
, fixcluster::thread_members_get
, refactorcluster::threads_get_active
, add a bunch of tests for threads (#700) - Allowed sync/coro function generator to handle overloaded functions, update sync/coro methods (#705)
interaction_modal_response::fill_from_json
(#703)- Fixed errors on Windows when linking an executable with DPP (#697)
- Fix linking errors on Windows when linking an executable with dpp
🚀 Performance Improvements
- Coro: lock free
dpp::async
♻️ Refactoring
- Coro: renamed
dpp::awaitable
todpp::async
- Change
interaction_response.msg
from message* to message, fixing double free on copy (#762) - Json parsing helper functions added to unify the way arrays are parsed (#744)
- Use nullptr instead of NULL
- Use structured bindings
- Change
std::for_each
to ranged for loops - Changed the behaviour of
channel::add_permission_overwrite
(#702) - Changed the behaviour of
channel::add_permission_overwrite
& addedset_permission_overwrite
andremove_permission_overwrite
methods
🚨 Testing
- Add enum for test status and type, make each test a variable, add coro tests
- Add g++-12
- Add extended unit tests mode (#731)
📚 Documentation
- Changed
README.md
to include nightly builds. (#821) - Add emojis to titles in readme (#817)
- Refactored page links (#808)
- Added a page about sending "only you can see this" messages. (#803)
- Created a page for separating events into new classes. (#802)
- Added a new page for
on_message_create
and changed warnings about message content privilege. (#799) - Improved Jenkins page. (#798)
- Fixed several small things in docs (#797)
- Coro: update docs for PR #763
- Added docs page about checking permissions (#777)
- Fixed some doc pages with errors. (#784)
- Created a page for automating builds with Jenkins. (#783)
- Made
collect_reactions
page more explicit. (#780) - Fixed typo in documentation example (#782)
- Fixed errors on reaction collectors example page (#779)
- Remove lines of code badge as it is broken upstream (#772)
- Fix of #771 where final push was missed. (#773)
- Improve build speed of codeql (#769)
- Make the PR template less bloaty
- Governance, roadmap, security pages for best practices badge
- Add openssf scorecard to readme
- Fix typo (#741)
- Some tweaks in code examples (#742)
- Documentation for
unicode_emoji
namespace (#739) - Documented deprecation policy (#738)
- Updated
README.md
(#707)
💎 Style Changes
- Coro: split
coro.h
into its own folder
📜 Miscellaneous Changes
- (WIP) docs(coro): reorganize coro docs and add examples for new features (#818)
- Modernize command handle page (#800)
dpp::slashcommand
constructor for context menu commands (#801)- Updating to the correct AVX2 instruction.
- Updated out-dated doc pages to now use slashcommands. (#771)
- Update
disdppgloss.md
- Create
pull_request_template.md
- Update
scorecard.yml
- Update
dependabot.yml
- OpenSSF best practices badge (#766)
- Update
README.md
- D++ == CHAD++ // true (#747)
- Clang-tidy namespace comment autofix
- Enable CORO on g++11, g++12, osx
- Dont enable AVX when compiling on GHA
- Update
CONTRIBUTING.md
- Update
CONTRIBUTING.md
- add rules about not just using automated tools to generate bad prs - More spellcheck words
- Spellcheck words for emoji names
- Update .
cspell.json
- Better creation of unicode emojis that will actually work
- Update
INDEX.md
- Move misplaced compiler definitions to options and make linker option Debug-Mode dependent (#715)
- Adapt
dpp::user::get_default_avatar()
to new username system (#711) - Re-construct: Fixed issue #604 (#699)
- Adjust vcpkg ci action to modernize for next release, ref: microsoft/vcpkg#31568 (comment)
👷 Build/CI
- Silence changelog generator warning emission, not useful when running by hand (#814)
- We have to silence error reporting here or we get stderr intermixed into our changelog. this is just extra busywork during release that we dont want (#795)
- Force reupload with clobber, and sign a copy of the source archives (#792)
- Coro: add "resumer" to spelling checks
- Delete .clabot, not required for new cla/dco bot (#789)
- Create .onefuzz to make scorecard happy (#790)
- Create .clabot for CLA agreements for new contribs (#787)
- Improve changelog parsing and order (#768)
- Fix codacy not liking "else" for some reason 🙄
- Add signing shell script to auto sign releases with gpg and upload .asc alongside artifacts
- Apply security best practices (#749)
Thank you for using D++!