brainboxdotcc / DPP

C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
https://dpp.dev/
Apache License 2.0
1.05k stars 159 forks source link

feat: add embed-only message ctor #1100

Closed osirais closed 6 months ago

osirais commented 6 months ago

This PR adds an embed-only constructor to dpp::message. Since message(snowflake channel_id, const embed& _embed) exists, it seemed natural and useful to have a version without the channel id.

// this is probably the most common reply on my bot
event.reply(dpp::message{}.add_embed(embed));

// now you could just do this
event.reply(dpp::message{embed});

// or this with the implicit conversion
event.reply(embed);

Code change checklist

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

netlify[bot] commented 6 months ago

Deploy Preview for dpp-dev ready!

Name Link
Latest commit 00909875d7db7ebf78d4f853c88fe2ea1a3729ab
Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/65e265643b035e0008a20d3c
Deploy Preview https://deploy-preview-1100--dpp-dev.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.