DPP

C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!

APACHE-2.0 License

Downloads
56
Stars
943

Bot releases are visible (Hide)

DPP - v10.0.9 release

Published by braindigitalis over 2 years ago

We are pleased to announce the release of D++ 10.0.9! This new version further splits out events to give a separate on_slashcommand event, which can be used just to receive chat input type interactions.

Thie release also fixes some deadlocks in the new voice receive code in certain situations, and Discord now support registration of global commands instantly, which means we can use global slash commands in most of our examples.

The changelog is listed below:

Release Changelog

✨ New Features

  • Add on_slashcommand event that only receives ctxm_chat_input - this has its own parameter type

👷 Build/CI

  • Remove poor spelling checker on cron that makes prs
  • Disable doker build and sitemap gen on forks

📜 Miscellaneous Changes

  • Update SECURITY.md
  • Update bug_report.md

📚 Documentation

  • Make doxygen quieter
  • Check more often for completed runners
  • Some generator improvements

🐞 Bug Fixes

  • Async docsgen
  • Fix discord_voice_client hanging in destructor, again.
  • Fix potential hang in discord_voice_client destructor.
  • Fixed parsing bug in application.cpp and added url helpers in application

♻️ Refactoring

  • Change command registration to global in more examples

Thank you for using D++!

DPP - v10.0.8 release

Published by braindigitalis over 2 years ago

We are proud to announce that D++ 10.0.8 is now available! This release is packed to the brim with new features, fixes and improvements, at the forefront of these enhancements are:

  • Receiving audio when multiple users are speaking is now stable thanks to an awesome patch from @kar8uncle
  • Ability to receive combined audio for all users
  • Ability to set audio gain on a per user basis for received audio, again thanks to @kar8uncle
  • Support for Discord's new Auto Moderation feature
  • Support for Slash Command permissions version 2
  • Context menu application commands now have their own developer-friendly events rather than going through on_interaction_create - the old method still works too, so you aren't forced to change your bots if you dont want to or don't have the time to.
  • Full support for interaction followup messages
  • New overloaded event.reply() method for interactions, which can be called with no parameters to acknowledge a button or select list without sending a message.

...and much more!

The changelog is listed below:

Release Changelog

✨ New Features

  • Combined audio receive
  • Add auditlog entry for command permissions v2
  • Automoderation
  • Give each thread a custom name to aid in debugging and live diagnostics
  • New events on_message_context_menu/on_user_context_menu, nicer ways of accessing context menu actions for slash commands. the old way of accessing this still works too.
  • Add "followup"
  • Implement new calls: interaction_followup_create, interaction_followup_edit_original, interaction_followup_delete, interaction_followup_edit, interaction_followup_get; resolves issue #358
  • Add event.reply() with no params (or just callback) to acknowledge button or select without a message

📜 Miscellaneous Changes

  • Update README.md
  • Give voice courier a thread name
  • Update .cspell.json
  • Updated comment in context menu example
  • Update example for context menus to use new event

🐞 Bug Fixes

  • Include combined event too
  • Fix bug: use .contains instead of .at
  • ARM6 builds without voice, meaning no audio_mix
  • HERP DERP win #define's min and max, breaking std::max
  • Fix missing user_id field in voice_receive_t in case of lost packet.
  • Fix compiler warnings about virtual destructors.
  • Useless cat (meow)
  • Codacy style fixes

♻️ Refactoring

  • Remove one instance of HAVE_VOICE in the header
  • Improve code readability around combined audio receive
  • Improved context menu example & removed lowercase method in slashcommand::set_name
  • Remove Windows support for thread names and trim thread names to 15 chars plus null
  • Remove extraneous quotes around guild member search query.

📚 Documentation

  • Add gifv to cspell
  • Remove pointless line
  • Some docs improvement
  • Tidyup docs

💎 Style Changes

  • Codacy changes

Thank you for using D++!

DPP - v10.0.7 release

Published by braindigitalis over 2 years ago

We are pleased to announce the release of D++ 10.0.7! This new release provides support for the new slash command permission system, support for localization, and removes support for the older default_permission boolean flag.

Several fixes have been also been made for voice and for synchronous HTTP functions.

The changelog is listed below:

Release Changelog

🐞 Bug Fixes

  • This should be safe for a guild command
  • DELETE with content-type causes confusion for Discord API, fixes #356 reported by Paket236
  • Fix my dumbness
  • Fix segmentation fault on interaction sync functions
  • Slash command dm permission not set when false, to make sure it isn't sent with a guild command
  • Fix double-free of SSL client through dpp::voiceconn when disconnecting from a voice channel.
  • Fix properly unsetting deaf and mute
  • Fix ub
  • Filter out GUILD_JOIN_REQUEST_UPDATE
  • Put back __next_handle, oops
  • Fix for issue #357
  • Flip around the names of the functions
  • Fix issue on Windows

💣 Breaking Changes

  • default_permission has been removed from slashcommand
  • message_update now has the same style of signature as message_create, no pointer, and object called msg. This is to allow for a template to work on both

👷 Build/CI

  • Unit test for command translations

✨ New Features

  • Add translations, add new command permissions

📜 Miscellaneous Changes

  • Update issue templates

♻️ Refactoring

  • Remove unused using line
  • Remove check for emptiness of a vector in 'guild_bulk_command_create'
  • Remove check for emptiness of the vector
  • One ssl_ctx per thread, cuts down on memory and speeds up connection

📚 Documentation

  • Move utterances down
  • Add utteranc.es
  • Add utteranc.es to all pages
  • Fix doxygen comment

Thank you for using D++!

DPP - v10.0.6 release

Published by braindigitalis over 2 years ago

We are pleased to announce the release of D++ 10.0.6! The 10.0.6 release adds a new feature to help speed up REST requests made to Discord whilst still staying in line with rate limits. Where requests fall into different rate limit buckets, they will be parallelised by D++ and run alongside each other. By default, up to 8 buckets can be ran in parallel, you may increase this value either with a parameter to the dpp::cluster constructor, or at runtime using for example bot.get_rest()->add_request_threads(8) which would add a further 8 threads to the pool. Note that you cannot decrease the number of threads at runtime without deleting the dpp::cluster and constructing a new one.

The changelog is listed below:

Release Changelog

♻️ Refactoring

  • Some QoL tweaks, additional methods for iconhash etc
  • Improve speed of HTTP requests by parallelising requests, while ensuring that requests for the same rate bucket end up on the same thread in the pool at all times, which prevents rate limits from breaking. Update thread model chart. Note that completed requests are still delivered to the same single thread so that user's programs do not get broken by any assumptions they made about threading model
  • Tidy up channel flags, pack into smaller type, add unit tests for channel cache/types
  • Remove these from dev
  • Remove modernize so it can just check var names

🐞 Bug Fixes

  • Windows exceptions
  • Fix spelling error
  • Fixed "this" could be invalid when callback was called on post_rest because interaction_create_t is not valid after an interaction event returns

✨ New Features

  • Throw dpp::invalid_token_exception when bad token given at cluster::start - derived from dpp::rest_exception so not a breaking change
  • Allow users to specify number of threads for requests and even scale up at runtime
  • 'forum' channels (name subject to change)
  • Add set_channel_id and set_guild_id to message

📚 Documentation

  • Bump doxygen-awesome-css to v2.0.3
  • Add deprecation notice for group-dms

👷 Build/CI

  • Compile time improvements

Thank you for using D++!

DPP - v10.0.5 release

Published by braindigitalis over 2 years ago

We are happy to announce the release of D++ 10.0.5, which includes several bugfixes, and also includes a breaking change to the parameters to guild_get_bans and guild_get_bans_sync due to Discord adding additional parameters API-side.

There have been several performance improvements to the library, and we have added colour constants, default error logging to all callbacks if not specified, operator== for all dpp::managed derived objects and more!

The changelog is listed below:

Release Changelog

♻️ Refactoring

  • Lock doesnt need to be active when the thread is signalled
  • Some improvements to queueing to use shared_mutex, this will allow for some fun stuff (tm) later. Also, decrease timeout of queue thread by 10x to ensure things stay snappy in quiet patches
  • Deprecated summary in integration
  • Remove default callback from get method
  • Fix ugly sprintf cruft in etf parser
  • Changed name of 'hoki'
  • Split cluster sync calls to a cpp and h file, much faster to compile than inlines

🐞 Bug Fixes

  • Fixed HEAD_REF.
  • Params cant be defaulted as callback must be last
  • Windows being Windows
  • Mess detector
  • Derive json interface
  • Wasn't test compiled
  • Fix indentation, change from unsigned int to uint32_t and add include to dpp.h
  • Missing namespace
  • Fix missing exclamation point
  • Group together see entries so the docs are cleaner

📜 Miscellaneous Changes

  • Updated docs in guild.h & guild::get_banner_url can now return gif image urls
  • Updated comment on guild_get_bans
  • Update README.md
  • Update cluster_sync_calls.h
  • Update cluster.h
  • Updated cluster::guild_member_kick

✨ New Features

  • Added guild directory channel type
  • Add get, edit, delete original response
  • Add log_error
  • Add premium_progress_bar_enabled, fixes #270
  • Add request to speak timestamp, fixes #317
  • Add destructor for select option
  • Added more colors
  • Added color constants
  • Added setup guide for clion & small doc improvements
  • guild_member_timeout_sync
  • Add dependency libc6-dev-arm64-cross for ARM64 toolchain
  • Added guild_member_timeout and updated docs
  • Add set_guild_id
  • Add operator== for dpp::managed

👷 Build/CI

  • Some nice stuff in the changelog builder
  • Make this better at detecting symbols, make it detect filenames, and make a Discord compatible markdown output to save on maually converting it on release days
  • Adjust unit test for guild_get_bans
  • Remove FreeBSD from releases

💣 Breaking Changes

  • Breaking change from Discord, guild_get_bans and guild_get_bans_sync now support limit, before and after, and return a maximum of 1000 bans per call
  • Add parameter dpp::timer to timer_callback_t

📚 Documentation

  • Fix doxygen block for set_required
  • Update webhook example to use sync call

Thank you for using D++!

DPP - v10.0.4 release

Published by braindigitalis over 2 years ago

Version 10.0.4 of D++ is here!

This version of D++ includes the ability to call cluster methods such as message_get etc synchronously, as in, they wait until the command is complete and directly return a value instead of needing a lambda. These functions are identical in name to the asynchronous ones, except their name ends in _sync, e.g. message_get_sync(). These functions have specific uses, please be sure to read the docs for them on dpp.dev!

The changelog is listed below:

Release Changelog

👷 Build/CI

  • disable freebsd builds
  • add detection of compiler features to cmakelists, remove [[maybe_unused]] thats not_maybe_ignored
  • some adjustments for unit tests

🐞 Bug Fixes

  • fix optional parameters in _sync calls
  • use doxygen tag to force sync methods to dpp::cluster
  • Fix typo in README
  • fix issue with parameterised dpp::sync, remove cmakelists duplication, add dpp::sync unit test
  • convert dpp_sync to a variadic template dpp::sync
  • windows unit tests, breakpoints thrown
  • wrong warning number was silenced
  • fix compilation error on windows, silence macro warning
  • spelling in new feature
  • maybe unused

📜 Miscellaneous Changes

  • Update json_interface.h
  • Update .cspell.json
  • update doc image

✨ New Features

  • _sync calls in cluster
  • add dpp::sync() for syncronous REST calls
  • added setup guide for clion & small doc improvements
  • default lambda for all api callbacks now logs api-level errors to the logger

📚 Documentation

  • tweak doxygen settings
  • fix some broken see's
  • reference discord api ref for each api call

Thank you for using D++!

DPP - v10.0.3 release

Published by braindigitalis over 2 years ago

We are pleased to announce the release of D++ 10.0.3! This release adds, amongst other things:

  • HTTP Keepalives, meaning that the library can send API calls much faster, and respond to slash commands quicker!
  • Refactored ordering of member variables saving significant memory at scale
  • Added utility functions for escaping of markdown
  • Removal of the type string from confirmation_callback_t, as std::holds_alternative can do this instead

The changelog is listed below:

Release Changelog

🐞 Bug Fixes

  • ordering
  • missing virtual dtors
  • naming and size of BUFSIZZ
  • match new order in initialisation
  • some fixes to keepalive, don't allow any session left idle for more than 60 secs to be reused, and dont try and save known dead connections where fd = -1
  • fixed wrong return types of several cluster methods
  • fix wrong http method
  • fixed user::get_avatar_url
  • broken include got in here somehow
  • spelling errors
  • we had two json_fwd.hpp
  • fix docs check
  • Fix #227 remove docs pertaining to messages_get with limit > 100
  • Fixes by misspell-fixer

✨ New Features

  • added > character to escape markdown method
  • http connection keep-alive and request chunking
  • added get_sticker_url to sticker class
  • add dpp::utility::version()

♻️ Refactoring

  • reorder structures to match alignment(amd64)
  • add json_interface that specifies the standard methods the rest_request<> template uses
  • migrate all possible REST to new template
  • move these to using the template
  • start of templating rest call bodies. much neater
  • improve performance of url_encode, move to utility namespace, expose a bunch of internal templates in dpp namespace from stringops.h

📜 Miscellaneous Changes

  • updated docs & changed component placeholder max-length
  • updated sticker::get_url
  • Update close-master-pr.php
  • updated doc

📚 Documentation

  • auto generate docs for event handler objects
  • hide an internal var from doxygen
  • redo windows guides to basically railroad new users to using the template

💎 Style Changes

  • auto spell checking of docs PRs

👷 Build/CI

  • replace azure. from sources.list because azure mirror is flaky af

💣 Breaking Changes

  • remove the string type parameter to confirmation_callback_t, because its possible to use std::holds_alternative for this on the value

Thank you for using D++!

DPP - v10.0.2 release

Published by braindigitalis over 2 years ago

We are happy to announce that D++ 10.0.2 is here! It features a lot of quality-of-life improvements listed below, and some small fixes. Our current drive is to improve documentation of existing features. If you feel you would like to get involved with this please do submit a PR!

Major changes:

  • D++ is now compilable to Apple Silicon
  • Full support for containerised workflows

Release Changelog

✨ New Features

  • add whole message object to interaction, for context menu clicks on a message
  • dpp::utility::markdown_escape()
  • new ctor for dpp::utility::uptime taking a double for use with time_f() updated: library now checks when you bind an event to certain types if you have the privileged intent needed to use them, if you dont it will emit a warning to the log explaining what is needed
  • added example to README.md
  • added message content intent note to the guide

🐞 Bug Fixes

  • fix for apple silicon
  • fix for apple silicon
  • fix missing intents, and add basic logger to examples
  • fix syntax error
  • fix slashcommand creation in examples
  • fix dir for building
  • fix wrong make install dir
  • signedness
  • fix blocking write() error checking
  • missing export reported by Eren
  • Fixed the blank I forgor

♻️ Refactoring

  • make set_warning_callback private, it is for internal lib use
  • remove unneeded headers and add comments
  • change sitemap generator to once per week on Saturday
  • refactor example
  • refactor example
  • refactor slash command ctor
  • refactor examples page and added message content intent whenever it's needed to the ctor

📚 Documentation

  • history -> past
  • docs fixes

📜 Miscellaneous Changes

  • updated docs of howto remove a timeout from a member
  • updated README.md
  • updated mentioned version
  • updated doc examples
  • Update docker.yml
  • Update docker.yml

Thank you for using D++!

DPP - v10.0.1 release

Published by braindigitalis over 2 years ago

After a busy week of development we are proud to announce the release of D++ 10.0.1! The 10.0.1 branch comes with a lot of refactoring, performance improvements, and quality of life improvements. Amongst these improvements are some shorthand ways of handling and declaring slash commands to make this simpler. To see this in action check out the first bot tutorial.

We have also updated nlohmann::json to 3.10.5 and fmtlib to 8.1, the latest available versions. Our Docker image (brainboxdotcc/dpp:latest) is now kept up to date with our master branch at all times, making it useful as a deployment option - see here for an example of how to use this to deploy a D++ bot via a Docker image.

The changelog is listed below:

Release Changelog

🐞 Bug Fixes

  • fix up the webhook ctor PR, and add a unit test
  • fixed stuff mentioned in brainboxdotcc/DPP#293
  • force all slashcommand names to lowercase internally
  • fix uppercase p
  • fix accidentally deleted text
  • fix deprecated invite stage
  • fixed marks
  • fix windows issues and make unit tests pass
  • make unit tests able to be run on windows
  • fix warning by using fallthrough annotation
  • Fixes by misspell-fixer

♻️ Refactoring

  • deprecate but not remove commandhandler
  • add attachments array to sent messages, if it contains values
  • bump nlohmann to 3.10.5, fmtlib to 8.1
  • remove useless line in ARMv7 cmake
  • deprecated invite stage :(
  • remove testing docs
  • change to break bc it was a bug

✨ New Features

  • add back images
  • added webhook constructors
  • add QOL methods to dpp::interaction that streamline slashcommand events, add dpp::utility::cout_logger(), and add two new interaction_create_t::reply overloads that just take a message or string
  • added current_member_edit
  • added build-a-discord-bot-windows-wsl
  • add unit tests page

📚 Documentation

  • docs fix: uppercase command name
  • get rid of screenshot showing message example
  • update first-bot page to use interactions not message commands

👷 Build/CI

  • docker deployment
  • update dockerfile, and add a CI action to update the docker image
  • improve changelog builder
  • allow turning off the ldconfig step, and set soversion and symlink
  • cmake option to allow disabling of voice even if we have the libs
  • make this work on pull request to master

📜 Miscellaneous Changes

  • Update 03_example_programs.md
  • updated link
  • updated docs of guild_set_nickname
  • updated docs of current_member_edit
  • updated file upload example
  • Update close-master-pr.php
  • update build and test docs

Thank you for using D++!

DPP - v10.0.0 release

Published by braindigitalis over 2 years ago

🎉 We are pleased to announce the 10.0.0 release of D++! 🎉

As our version releases match the supported API versions, and discord have recently announced version 10 of the Discord API, we are bumping our own version up to 10.x to indicate support for this new version.

If you have recently updated to the last 9.x version, there is no immediate need to upgrade as we are aware this was only a couple of days ago. The changes in the v10 release are minimal and this release is somewhat ceremonial.

Enjoy!

The changelog is listed below:

Release Changelog

📚 Documentation

  • update FAQ to refer to v10

♻️ Refactoring

  • cut down usage of fmt a bit to reduce compile times and compile memory usage

Thank you for using D++!

DPP - v9.0.19 release

Published by braindigitalis over 2 years ago

We are happy to announce the release of D++ 9.0.19! This version features a rewrite of the HTTP system of the bot which makes REST requests. We have replaced it with something faster, more compact, and easier to maintain, which also fixes some long-standing bugs with windows file uploads.

Alongside this we have also made modal dialogs a stable API feature in the library, and added support for slash command attachment uploads parameters. dpp::utility::read_file is also now fixed on windows. Many small methods have been added, which are quality of life fixes such as user::format_username().

The changelog is listed below:

Release Changelog

✨ New Features

  • added stage attribute to dpp::invite
  • added required field to_json in component and removed experimental comments of the modal input
  • user::format_username() and utility::bot_invite_url()
  • added required field to dpp::component
  • support for ephemeral event.thinking()
  • channel::add_permission_overwrite()
  • added global_command_get as it was missing
  • added dpp::guild_command_get as it was missing
  • added recursive command option parsing
  • added recursive command option parsing
  • added some fill_from_json methods
  • added double_not_null
  • added guild_commands_get_permissions, guild_bulk_command_edit_permissions and guild_command_get_permissions

♻️ Refactoring

  • add exception handler in queues.cpp for http_client ctor use
  • remove cpp-httplib
  • unit tests PASSED for new http client
  • support plaintext downgrade for ssl_client
  • new client files
  • begin replacing cpp-httplib with something a bit more streamlined
  • constructors for dpp::command_source
  • provide access to underlying events in dpp::command_source
  • refactor slash command permission thing

💣 Breaking Changes

  • param_info now accepts correct choice types

🐞 Bug Fixes

  • fixed stage instance getter, modifier and delete methods in cluster
  • fix dpp::utility::read_file on windows
  • fix missing include
  • check that version enforcement succeeds
  • dont allow SSL 3.0 TLS 1.0 or 1.1 in SSL negotiation
  • numeric limits is odd on windows
  • properly serialize role in role_edit()
  • fix windows builds
  • fixed typo in command_option::fill_from_json
  • fixed communication_disabled_until parsing in guild_member::build_json
  • fixed communication_disabled_until parsing in guild_member::build_json
  • fixed guild member in interaction
  • added guild_id and user_id to guild_member default ctor
  • add virtual destructor for dpp::interaction_create_t
  • serialise content and embeds array, even if empty
  • fixed member.user_id and member.guild_id were not set when receiving an interaction
  • fixed cluster::guild_search_members
  • fixed cluster::guild_get_members
  • mute wasn't correctly build in guild_member::build_json()
  • fixed command_option_choice::fill_from_json and added unit test for it

👷 Build/CI

  • unit tests for new http client

📚 Documentation

  • add example for co_attachment parameter type
  • comments for new http client
  • remove 'test dpp' section
  • remove experimental warning on modal dialogs
  • fix doxygen line
  • add example eval command 🤮

Thank you for using D++!

DPP - v9.0.18 release

Published by braindigitalis over 2 years ago

We are proud to announce the release of D++ 9.0.18! This version introduces a few new feaures, the most notable are:

  • Multi-file upload is now supported!
  • We now offer prebuilt binaries for FreeBSD
  • Headers have been refactored for faster compilation
  • Full presence activity support for bots which are utilising the presence intent

The changelog is listed below:

Release Changelog

🐞 Bug Fixes

  • double include of array on win32
  • fix concurrency setting
  • fixed bug in activity
  • fixed reference bug in the command_permission constructor
  • role_edit_position not working
  • emoji::format didn't return animated emojis
  • unused variable
  • single file http_request
  • fixed several typos in the docs
  • fixed parameters of execute_webhook
  • fixed url parameters in guild_event_users_get
  • fixed url parameters of guild_event_users_get
  • fixed timestamp url-parameter in thread-getters
  • fixed parsing in the four thread-getters and fixed parameter creation

♻️ Refactoring

  • xcode clang is demanding we explicitly include this
  • timer.h needs unordered_map and stddef on clang
  • huge change to remove discord.h, split up the headers a little to fix circular dependencies
  • new channel_edit_permissions() overload & const params
  • automatic cache of users and members on receipt of slash command
  • changed the activity_flags back to binary format
  • clean up ci.yml
  • improved dpp::invite, fixed bug where guild_id was not set

👷 Build/CI

  • master pr close cleans up runs after itself
  • files werent added
  • auto close master-targetted PRs every 30 mins
  • correctly set name of artifact
  • move cpack into the bsd vm
  • tbz2
  • change bsd to bz2 compressed archive as cpack pkg build is broken due to segfault bug!
  • freebsd pkg build
  • run cpack on bsd
  • freebsd: reduce build concurrency
  • add git to freebsd
  • add dpp build to freebsd action
  • freebsd experimental ci
  • turnstyle is no longer required
  • there was a test case that runs on PR's and shouldnt.
  • better restriction of concurrency
  • pull in env vars during unit test run
  • error logging
  • set various ids from env vars

📚 Documentation

  • typo in style guide
  • update INDEX.md
  • fix param description

✨ New Features

  • setters for dpp::channel
  • added note
  • added note to guild_edit_command_permissions
  • added role method: role_edit_positions
  • added const declaration in command_permission constructor
  • added note to dpp::guild_edit_widget
  • added activity emoji
  • added buttons struct
  • added activity assets
  • add turnstyle
  • added details field to activity
  • added overloaded method set_footer in dpp::embed
  • added audit log notes to webhook methods
  • added create_timestamp to thread_metadata
  • added failed to mention some roles in thread flag to message flags. documented here
  • add multiple attachments
  • added note to slash command example
  • added timestamp parser to unit tests
  • added webhook example
  • added new attributes in ctor
  • added note

📜 Miscellaneous Changes

  • new category & regex for changelog.php

💣 Breaking Changes

  • remove non-existing events

💎 Style Changes

  • comments

Thank you for using D++!

DPP - v9.0.17 release

Published by braindigitalis almost 3 years ago

After a long Christmas break we are happy to bring you D++ 9.0.17! Now that the large man in the red hat has been, we give you one final late present of a new release. This is mainly a quality of life release, with a few fixes as listed below.

The changelog is listed below:

Release Changelog

✨ New Features

  • add comment to resolved member_permissions
  • add guild member permissions in interactions
  • add some comments to docs
  • add fix to guild_command_create to solve the permissions edit issue
  • added note to user_get
  • added static cast
  • added constructor for command_permission
  • Add image example
  • automatically loop and retrieve messages_get with limit > 100
  • added channel, guild, role, and user- icons/avatars getters
  • added icon, banner, splash and discovery splash -url getters
  • add guild_member::is_communication_disabled()

🐞 Bug Fixes

  • fix slash command permissions not copied into struct
  • fixed slash command permissions not working
  • fix / -> \
  • remove export
  • fix wrong openssl
  • bump to force ci run
  • correctly terminate shard threads on cluster destruction

♻️ Refactoring

  • remove default parameter
  • better read_file and unit test for it
  • add utility::cdn_host constant and utility::avatar_size

📚 Documentation

  • move around the note in the repl page to be above the fold
  • add image for repl page
  • fix missing bracket
  • update FAQ and add page documenting how to run a dpp bot in repl.it
  • docs fix wording

Thank you for using D++!

DPP - v9.0.16 release

Published by braindigitalis almost 3 years ago

We are happy to announce the release of D++ 9.0.16! This version adds support for the newest Discord API features including member timeout, for when you really want your bot to stick a user in the sin-bin and leave dealing with it to Discord.

It also adds support for interaction locale fields, and some quality of life fixes for event routers.

There is experimental support for modal dialogs, but this is not yet available for general use by Discord and will be released in due course. For more information of this stay up to date with developments on our support server!

The changelog is listed below:

Release Changelog

✨ New Features

  • add moderate members permission
  • add interaction locales
  • added messages. this was missing for context menu actions i think
  • added user context menu example
  • add DPP_EXPORT stanza to find_guild_member()
  • operator bool() for event_router_t
  • on_form_submit event for modal dialogs
  • add comments and helper functions
  • experimental; modal dialog interactions

🐞 Bug Fixes

  • improve shard ready message
  • ctor for collector doesnt set owner
  • openssl can return a successful read of 0 bytes. Don't bother calling handle_buffer() on this

♻️ Refactoring

  • improved attachment example
  • add size parameter to get_avatar_url of user and guild_member

💎 Style Changes

  • remove some casts

📚 Documentation

  • docs fix syntax and change event params to auto for simpler example
  • add example of collector::filter
  • documentation for modal dialogs: experimental and subject to change
  • added example on how to invite a bot
  • fix typos in "Using Slash Commands and Interactions"
  • fix context menu example
  • fix for the code in the context menu example
  • fix alignment of headers
  • fix first-bot tutorial image
  • fixed arrow size

Thank you for using D++!

DPP - v9.0.15 release

Published by braindigitalis almost 3 years ago

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++!

DPP - v9.0.14 release

Published by braindigitalis almost 3 years ago

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 https://github.com/discord/discord-api-docs/pull/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++!

DPP - v9.0.13 release

Published by braindigitalis almost 3 years ago

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++!

DPP - v9.0.12 release

Published by braindigitalis almost 3 years ago

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++!

DPP - v9.0.11 release

Published by braindigitalis almost 3 years ago

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
DPP - v9.0.10 release

Published by braindigitalis almost 3 years ago

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++!

Package Rankings
Top 9.59% on Proxy.golang.org
Top 30.73% on Formulae.brew.sh
Badges
Extracted from project README
Discord Codacy Badge OpenSSF Best Practices D++ CI OpenSSF Scorecard AUR version XBPS version Homebrew version Contributor Covenant Discord