Skip to content

Releases: brainboxdotcc/DPP

v9.0.15 release

29 Nov 15:39
Compare
Choose a tag to compare

We are very proud to announce the release of D++ 9.0.15! This release is a recommended upgrade for all, as it includes several stability and performance released improvements plus some fixes.

There is an important breaking change in this release; All objects and properties in the message event are now accessed on the stack with the dot (.) operator. for example, event.msg.author.id, Please be aware of this and be prepared to refactor this part of any bots you are updating!

Alongside this we are also adding new types for your use such as dpp::collector and dpp::cache - check them out, i'm sure you'll find a good use for them in your bots!

The changelog is listed below:

Release Changelog

💣 Breaking Changes

  • change how dpp::message and author are stored to not be pointers. more user friendly and trivially copyable
  • Change channel_edit_position to channel_edit_positions

✨ New Features

  • get_mention() for user, guild_member, role, emoji, channel, plus utility::timestamp(), adds support for all mentionable ping formats as documented here: https://discord.com/developers/docs/reference#message-formatting
  • add managed::get_creation_time(), returns creation timestamp of any object with a snowflake id
  • dpp::collector and derived forms for object collection
  • cache type is a reusable template. more types are derived from dpp::managed.
  • add scheduled events, stage instances, threads and stickers as additional fields of guild_create_t
  • add presences to on_guild_create event, will be filled only if presences privileged intent is set
  • added attachment example
  • Add current_user_set_voice_state, user_set_voice_state

🐞 Bug Fixes

  • throw dpp::voice_exception when not built with voice support instead of silently failing
  • fixed compile errors of cache example in the docs
  • role::premium_role wasnt working because discord api has a bug
  • ETF warnings and 4002 oof decode error with all intents enabled
  • wrong overloaded return type, reaction_collector::completed
  • inverted check causes event to not fire if caching is off
  • fix broken docs
  • g++8.3 template deduction seems broken
  • win: fix unused var warnings
  • Fixed mingw, added link
  • Fix broken channel_edit_position

👷 Build/CI

  • integrate new changelog builder
  • better changelog generation, saving serious time for putting out a release. Who really wants to be editing a document every week
  • update makerelease to support Visual Studio 2022 binaries
  • cache docs and unit tests

📚 Documentation

  • example of cache<T>::get_mutex()
  • update to indicate 2022 works
  • page on variable ownership within lambdas and locals
  • update readme to indicate Visual Studio 2022 support
  • add Visual Studio 2022 support to FAQ
  • fix arg list too long stopping docs gen
  • documentation for collector
  • add example program for dpp::cache

♻️ Refactoring

  • return type of get_container is now auto

Thank you for using D++!

v9.0.14 release

23 Nov 23:34
8ab0ca5
Compare
Choose a tag to compare

We are proud to announce the 9.0.14 release of D++! This release adds support for timed listeners, timers and one-shot timers, enhances the event system, adds fixes for guild scheduled events and many other features and smal fixes.

It is a recommended upgrade, with improvements in performance and additional API support.

The changelog is listed below:

Release Changelog

💣 Breaking Changes

  • breaking: update to newer event member struct as specified by discord devs

✨ New Features

  • feat: timed listeners and oneshot timers
  • feat: add support for timers, cluster::start_timer & cluster::stop_timer
  • feat: add guild::set_name(), document rationale behind setters in objects and when they can be used
  • feat: add setters that validate lengths and logic to aid in eventual merge of discord/discord-api-docs#4113
  • feat: guild_event_get with user count plus unit test
  • [minor:] add communication_disabled_until field
  • event_member structure added
  • impro: exception improvements, and utility::read_file

♻️ Refactoring

  • refactor: removal of camel case in internals
  • refactor: change how we handle events to make things much cleaner. All event types in dpp::cluster are now a templated class with operator() on it
  • refactor: remove some code duplication
  • refactor: simplify template signature for new event typesd (thanks for fix, ray)
  • [impro:] add basic setters for guild_member
  • [impro:] remove stuff erase() already does for us
  • [impro:] change order for consistency
  • impro: add ts_to_string function ad use it where we had duplicated code for timestamps
  • impro: add unique/shared lock mechanism around event_router_t
  • impro: use utility::validate on role names
  • [impro:] add mention_replied_user param toreply()
  • impro: scheduled events; allow nulling of channel_id
  • impro: Remove speaker_ids from scheduled event. This is not supported going forward by discord fix: Fix guild_event_users_get, documented call was different to what is returned in production ci: add and validate new unit test for guild_event_users_get

🐞 Bug Fixes

  • [fix:] fix the casing of functions
  • fix: make next handle id shared across all handlers, so they cant collide
  • fix: make next handle id shared across all handlers, so they cant collide
  • fix: fix discords documentation oddness that was silently fixed
  • fix: mention user on reply has been broken since forever

📚 Documentation

  • docs: fix comments in cluster.h on some vars
  • docs/fix: Add support for detaching events in commandhandler, and document the fact that use of auto_attach_events=false is rarely required now
  • docs: disable SHOW_HEADERFILE
  • docs: update documentation
  • update comment to indicate that the vanity url cannot be set via a bot
  • added attachment example
  • add sitemap generator
  • docs: document timer_t members
  • docs: fix docs that say things return dpp::message when they return dpp::confirmation

👷 CI/Build

  • ci: increase timeouts for unit tests as we have more of them

Thanks for using D++!

v9.0.13 release

17 Nov 00:41
Compare
Choose a tag to compare

We are pleased to announce D++ 9.0.13, a minor feature release which adds full support for the new Guild Scheduled Events feature of the Discord API. Alongside this are some minor fixes and quality of life tweaks as documented below.

This is upgrade is recommended if you wish to use the new guild scheduled events feature in your project.

Release Changelog

💣 Breaking Changes

  • [break:] add additional parameters to thread_create functions

✨ New Features

  • [impro:] add message_create_t::send() & reply()
  • feat: add before/after parameters for event guild user list api call
  • feat: add role setters and guild manage events permission
  • feat: guild scheduled event REST calls
  • feat: guild scheduled events - websocket events
  • add channel icon and banner, discord docs PR#4068

🐞 Bug Fixes

  • fix: message_reference was missing from created messages
  • [fix:] add r-value reference overloads
  • [fix:] incorrect types while to json and from json

Thanks for using D++!

v9.0.12 release

15 Nov 12:32
Compare
Choose a tag to compare

The 9.0.12 release of D++ is now available! This release has a lot of small changes, some of them breaking changes, which bring the library up the the current bleeding edge Discord API. All new channel flags, guild flags and other features are supported.
Alongside this, the return types of some lambdas (callbacks) have changed, e.g. the addition of dpp::user_identified for users which contain oauth2 specific fields and changes to the reaction events to work when caching is disabled, or the cache is out of date. The names of some functions have also been changed to match our naming conventions in dpp::cluster, and thread calls now use the separate dpp::thread class as opposed to dpp::channel.

This is a recommended feature upgrade for all who wish to stay current with the latest Discord API features in their bot!

Release Changelog

💣 Breaking Changes

  • breaking: refactor pins_get to channel_pins_get, get_guild_invites to guild_get_invites
  • feat: add dpp::user_identified as a derivative of dpp::user
  • refactor: split up threads and channels into dpp::thread and dpp::channel, thread is derived from channel
  • change reacting_user to snowflake reacting_user_id in message_reaction_remove event

✨ New Features

  • feat: add attachment::download(), for downloading an attachment
  • feat: add role::get_members(), helper function to get all members of a role
  • feat: new guild flags for role icons, stickers, private and seven day/three day thread, and ticketed events. deprecated: guild voice regions
  • feat: add additional fields to dpp::guild plus turn some uint8_t fields into enums to make them more user friendly
  • feat: add video_quality_mode, rtc_region, permissions (only for use in an interaction) and thread_member to dpp::channel and dpp::thread
  • feat: add extra guild flags, and more comments

🐞 Bug Fixes

  • fix: change class to struct in some message members/ctor
  • fix tagging for changelog builder
  • fix: restrict slashcommand name to 32 chars and desc to 100 chars (utf8)
  • fix: fix strptime use on win32
  • fix: windows date parsing was broken
  • fix: change messages_get limit to uint8_t and clamp it at 100
  • fix: messages_get had an invalid http body and would throw
  • fix: potential crash in reaction events if somehow guild is not in cache
  • Fix channel_edit

📚 Documentation

  • docs: point win users right at the template
  • docs: fully and properly document all thrown exceptions
  • docs: document name/description limits in dpp::slashcommand setters
  • updated embed-example-image so that it now actually replies

👷 CI/Build

  • make unit testing more coherent, and allow it to end before its minute is up
  • ci: add stale issue/pr auto close
  • ci: extra unit tests for channel_get, guild_get
  • ci: date parsing and iconhash unit tests
  • ci: add voice and cache unit tests
  • ci: add unit tests
  • ci: unit tests for reaction
  • ci: proper unit test system

Thanks for using D++!

v9.0.11 release

07 Nov 13:48
Compare
Choose a tag to compare

We are pleased to announce the 9.0.11 release of D++! This release includes some hotfixes to make voice connections work again (for those of you who were struggling to connect to voice channels), and adds prebuilt RPMs to our release schedule.

If you were having issues with voice this is a strongly recommended upgrade.

Release Changelog

💣 Breaking Changes

  • fix: for some reason global_command_create and guild_command_create alter the referenced variable, this is not threadsafe. was even documented too -- not sure where this came from. Reference is now const

🐞 Bug Fixes

  • fix: voice connection websockets only support OP_TEXT type frames
  • fix: error-check groups of data before iterating them in REST calls

♻️ Refactoring

  • impro: change some push_back for emplace_back

👷 CI/Build

  • ensure that debug builds are built using CMAKE_BUILD_TYPE rather than our own BUILD_DEBUG
  • add -DBUILD_DEBUG and -DBUILD_O3 for debug builds and speed-optimised builds. both off by default
  • change to -Os instead of -O3 optimisation flag. This is -O2 without code bloating optimisations. The size of the release is just getting too big to manage.
  • add rpm's to release builder
  • fix/ci: correct deps for rpm

📚 Documentation

  • docs: document the fact that discord caches slash commands (sucks)
  • changed the embed example so that there is an example on how to reply on messages
  • docs: further fixes and improvements to the docs
  • docs: further document missing things
  • docs: document methods and classes that were missing comments
  • docs: document type in the variant for all callbacks, and type type in the lambda for all events

v9.0.10 release

04 Nov 17:23
Compare
Choose a tag to compare

Release Changelog

We are pleased to announce the release of D++ 9.0.10! This release is mainly a feature release, with a whole lot of features listed in the changelog. Amongst other changes, the library now supports slash command parameter auto completion, minimum and maximum numeric values, and allows for multiple listeners to safely hook the same events.

For full details of the changes please see the change log below!

Release Changelog

✨ New Features

  • feat: command parameter autocomplete
  • feat: add guild specific member avatar
  • feat: add interaction_create_t::thinking()
  • feat: cluster::current_user_connections_get - needs oauth2 connections scope
  • feat: guild welcome screen functionality
  • feat: multiple listeners allowed for an event. event cancel feature.
  • feat: event hook functions return a handle, which is raw ptr to the function hooked, wrapped in size_t
  • feat: add detach_ methods for all event listeners
  • feat: add sticker/stage instance audit log entry types
  • feat: add cluster::current_application_get() and classes application, app_team, team_member
  • feat: utility::rgb() helper functions
  • feat: add support for min_value and max_value on dpp::command_option with type co_number or co_integer
  • feat: add thread_member to confirmable_t
  • feat: Add cluster::get_thread_member

🐞 Bug Fixes

  • [fix:] remove unused lambda captures
  • [fix:] add callbacks to commandhandler functions
  • [fix:] add missing callback parameter in functions
  • [impro:] fix clang's warnings about unused param
  • [impro:] const-qualify event map
  • fix: Add missing bitrate, Fix rate_limit_per_user to act as slowmode instead
  • [fix:] Fix Channel struct

👷 CI/Build

  • [fix:] cmake-cpack collision with choco pack
  • [fix:] remove 'rm' since GH does this already now

📚 Documentation

  • docs: docs for application helper flags
  • docs: set content-maxwidth to 90% (looks better but still wider)
  • docs: update to v1.6.1, upstream claims fixes hamburger overlap
  • docs: autocomplete example and docs fixes
  • added application creation page
  • docs: document all event_dispatch_t derivatives

Thanks for using D++!

v9.0.9 release

26 Oct 15:29
Compare
Choose a tag to compare

We are happy to announce the release of version 9.0.9 of D++! The 9.0.9 release has some major new features bundled within it. The main features of this release are:

  • D++ now has full support for ETF websocket protocol (a binary protocol which is much faster and simpler than JSON to parse). This is easy to turn on by calling cluster::set_websocket_protocol before cluster::start
  • Added proper support for stage instances (events and REST calls)
  • Add audit log reasons to all REST calls that support it, via cluster::add_audit_reason
  • Support for building in MINGW (no voice support yet)

The full changelog of D++ 9.0.9 is listed below:

Release Changelog

✨ New Features

  • full support for ETF websocket protocol
  • Support for building in MINGW (no voice support yet)
  • Support for stage instances
  • Add audit log reasons via cluster::add_audit_reason()

💣 Breaking Changes

  • Structure format for stage instances has changed

♻️ Refactoring

  • remove socket notifier as its reason for existing is not needed any more. Replace with much simpler std::condition_variables
  • Improve performance in main parse loop by avoiding double find()
  • Improve performance of low level buffer parse in wsclient

🐞 Bug Fixes

  • Fix: silenced EMBEDDED_ACTIVITY_UPDATE, no docs on this yet
  • Improved thread support
  • fix 404 in invite_get method
  • fix message_delete_bulk function

👷 CI/Build

  • Enable parallel builds on GH Actions
  • build: splitting up of cluster into multiple files each with a subsystem within

📚 Documentation

  • document support for mingw
  • fixed typo in doc
  • fix exec example
  • mention ETF as a killer feature in readme/docs index
  • Fixes by misspell-fixer
  • call the timestamp setter in the embed example instead of assigning the value directly

Thanks for using D++!

v9.0.8 release

14 Oct 12:52
Compare
Choose a tag to compare

Version 9.0.8 of D++ is finally here, with a whole load of new features and fixes for use in your projects! This is a recommended upgrade as it fixes a lot of issues, some related to receiving voice which was introduced as a feature in 9.0.7.

The full changelog of D++ 9.0.8 is listed below:

Release Changelog

✨ New Features

  • feat: #121 - set_timestamp() for dpp::embed objects
  • feat: specialised from_string for plain integer types like snowflake
  • add support for animated guild banners (experiment). add comments where missing to other headers
  • Add optional channel_types in dpp::command_option
  • Added SOCKET_ERROR and INVALID_SOCKET defines if they dont exis
  • Updated WantWrite to use INVALID_SOCKET
  • Added dpp::socket typedef to handle different socket types for windows/other
  • updated socket related code to use dpp::socket
  • add support for webhook icon that is already base64 encoded
  • Change CoreExport macro to be DPP_EXPORT

🐞 Bug Fixes

  • fix: discord_voice_client::log not declared const, shadows parent
  • fix guild_get_member bug, incorrectly named endpoint
  • fix: getaddrinfo hints in sslclient
  • fix: thread_member_update event never initialised member information
  • fix: thread metadata not initialised on reading thread JSON from event
  • fix: not able to remove components on message edit
  • Change addrLen to socklen_t for cross platform compatability
  • Replace random number generator for port selection, replacing with 0 to let kernel pick port
  • Removed no longer used in_queue_port and out_queue_port variables.
  • explicit u8 on the start of emoji string literals to make this more portable to C++20 and other charsets
  • removed unused str_length from string_has_prefix
  • emoji_flags set to uint8_t
  • binary operators used on signed type role_flags set to uint8_t
  • binary operators used on signed type cluster constructor exception formal parameter removed as its unused lots of type conversions
  • forward declarations removed from commandhandler.cpp
  • add win32_safe_warnings.h pragma squasher
  • Fix warnings in commandhandler.h
  • fix: check if voice_client_speaking is attached before calling it, fixes voice send/receive breaking
  • Remove redundant component::build_json()
  • fix: component buttons: copy the emoji of the first button if the first button has an emoji and following buttons have no emoji

👷 CI/Build

  • remove some warnings not supported by clang
  • fix: these warnings not supported on gcc8, gcc9 - fails CI
  • fix: make safe for a bunch more warnings, e.g. switch-fallthrough
  • now -Wall-safe
  • Warning set to 3 for windows builds
  • Disabled warning 4251 on windows as it is given by exporting classes or structures with stl member variables (this is perfectly safe for our use case)

📚 Documentation

  • #126, properly hide our crawl links div and update to doxygen-awesome-css 1.6.0
  • created an embed example page
  • spdlog example now includes dpp after spdlog. add_subdirectory() for the spdlog added in the example of 'Building with CMake'
  • fixed css name
  • add register_commands() to commandhandler example
  • fix minor typo in commandhandler example
  • amendment to #119 - -note-colour-darker is better for eyes
  • docs: improvements to indexability
  • re added struct forward decl to commandhandler::route for doxygen
  • docs: document new methods
  • makedocs internal script
  • feat/docs: version dropdown

Thanks for using D++!

v9.0.7 release

04 Oct 15:49
Compare
Choose a tag to compare

After another week of development, D++ 9.0.7 has finally arrived! This release adds some huge new features for you, such as:

  • Voice receiving support (this is not officially supported by Discord but has proven stable for us and has been available in some other non-C++ discord libraries too for some time, so use at your own risk)
  • Ability to make arbitrary HTTP(S) requests through the D++ library bypassing the Discord REST queue
  • Support for role icons

We also now have a new documentation site at dpp.dev which is mobile friendly, fast, and easy to navigate. This replaces the old documentation at dpp.brainbox.cc which will be removed at some point in the future.

This is again a recommended upgrade, if you wish to stay current with Discord API features. If you need help or support with this library you can as always get help on the official Discord server.

Release Changelog

💥 Breaking Changes

  • Fix: guild_get_members (non-cached guild member fetch) now works correctly and has additional parameters
  • Fix for commandhandler registration to use bulk commands. This means that you must now call the new register_commands() method after adding commands to the handler if you are using slash commands.

✨ New Features

  • dpp::cluster::request() allowing for arbitrary HTTP requests through the library
  • Calculate opus packet duration internally
  • Add additional voice receive/status events
  • add role icon support
  • add guild_search_members function
  • Add respective objects mentioned in a message
  • finally allow dpp::utility::exec to run in windows
  • add silence method, and auto call it when connection becomes ready

👷 CI

  • Auto update windows-bot-template on successful master push. This means that the windows-bot-template repository will automatically remain current with the D++ master branch.
  • clean apt lists after install as per Codacy recommendation
  • attempt to fix MacOS CI by adding brew install OpenSSL as suggested by ray21
  • build: add Dockerfile

🐞 Bug Fixes

  • Message reaction events trigger correctly and don't depend on cache
  • Fix invalid endpoint in role_create function
  • Fix flags property of user - add public_flags
  • Fix audio not playing as raw
  • Amend comment for on_voice_receive
  • Don't use pointers for image_data property.
  • code refactor
  • pinned apt packages in Dockerfile as recommended by Codacy
  • codacy recommend fixes

📚 Documentation

  • Fix general typos and mistakes in the docs
  • Add some coding style re braces, and add reference to voice receive
  • Voice receive example
  • Add some coding style re braces, and add reference to voice receive
  • Mobile style cleanups
  • Relocate old URLs to new site
  • Docs beautification
  • Add MP3 streaming example

Thank you for using D++!

v9.0.6 release

27 Sep 15:00
Compare
Choose a tag to compare

We are happy to announce the 9.0.6 release of D++! This is quite a big release, with a whole load of fixes, changes, and enhancements listed below, and is a recommended upgrade especially for windows users and users of voice/audio. Many of the changes have been in relation to voice support, making things more stable, flexible and adding support for different use cases that many of you have requested. As always if you need assistance you can find us on the official support server!

Release Changelog

💥 Breaking Changes

  • better handling of failure to auto-shard, throws a catchable exception instead of leaving a dead cluster
  • Split discord_voice_client::send_audio() into two different functions discord_voice_client::send_audio_raw() and discord_voice_client::send_audio_opus(). It is also possible to set different duration on the packets sent to send_audio_opus(). Using this function saves on having to re-encode the stream again.

✨ New Features

  • add self_deaf and self_mute to the voice connect calls as optional bools
  • add functions to get/set timescale for audio
  • Library now generates pkg-config file on installation
  • Official FreeBSD support
  • add co_number and co_mentionable handling for slash commands, also increase int32_t integer value to int64_t
  • Ability to send pre-encoded opus frames directly to the audio system

👷 CI

  • add win32 (32 bit windows debug/release) builds

🐞 Bug Fixes

  • Fix internal const correctness in strptime
  • fix disconnecting from voice (forcing disconnection as moderator made it never able to reconnect again)
  • Fix windows builds not booting in some situations
  • Add dummy ptrs into discord_voice_client so that it doesn't break if the user builds their bot without HAVE_VOICE defined, but built the lib with it
  • Opus encoder/decoder/repacketizer pointers were uninitialised on all but the first construction of discord_voice_client causing potential stack corruption and crashes
  • Switch case break; was missing in commandhandler.cpp
  • change internal maps to const static
  • default slashcommand type to ctxm_chat_input
  • move opus.h into discordvoiceclient.cpp so that there is no reference to its headers on the public API side
  • sanity checks for destructing REST queue, allows dpp::cluster to be destructed properly

📚 Documentation

  • add set_type to the button components example
  • Add ogg opus streaming example
  • Update voice examples
  • Menus rejig, make a 'building a bot' section -- good for SEO and usability
  • really cool 'how to make a bot in vs' tutorial
  • Add an example for application sub-commands usage
  • doxygen runs are now clear of warnings

Thanks for using D++!