mirror of
https://gitlab.com/niansa/SomeBot.git
synced 2025-03-06 20:48:26 +01:00
Added "content" parameter to make_embed
This commit is contained in:
parent
2e1ca53412
commit
ed3f279a45
1 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,8 @@ public:
|
|||
.add_option(dpp::command_option(dpp::command_option_type::co_string, "thumbnail", "Kleines Bild", false))
|
||||
.add_option(dpp::command_option(dpp::command_option_type::co_string, "color", "Farbe", false))
|
||||
.add_option(dpp::command_option(dpp::command_option_type::co_string, "footer_text", "Fußzeilen-Test", false))
|
||||
.add_option(dpp::command_option(dpp::command_option_type::co_string, "footer_image", "Fußzeilen-Bild", false))), [&](const dpp::slashcommand_t& event) {
|
||||
.add_option(dpp::command_option(dpp::command_option_type::co_string, "footer_image", "Fußzeilen-Bild", false))
|
||||
.add_option(dpp::command_option(dpp::command_option_type::co_string, "content", "Nachricht über Embed", false))), [&](const dpp::slashcommand_t& event) {
|
||||
// Check that user has the correct permissions
|
||||
if (!event.command.get_guild().base_permissions(event.command.member).has(dpp::permissions::p_manage_messages)) {
|
||||
event.reply(dpp::message("Du braucht die Nachrichtenwaltungsberechtigung, um dieses Kommando zu verwenden.").set_flags(dpp::message_flags::m_ephemeral));
|
||||
|
@ -45,7 +46,7 @@ public:
|
|||
.set_color(color!=-1?color:0xffffff)
|
||||
.set_footer(strOrEmpty(event.get_parameter("footer_text")), strOrEmpty(event.get_parameter("footer_image")));
|
||||
// Send embed
|
||||
bot->cluster.message_create(dpp::message().set_channel_id(event.command.channel_id).add_embed(embed));
|
||||
bot->cluster.message_create(dpp::message().set_content(strOrEmpty(event.get_parameter("content"))).set_channel_id(event.command.channel_id).add_embed(embed));
|
||||
// Report success
|
||||
event.reply(dpp::message(std::string("Das Embed wurde erstellt!")
|
||||
+(color==-1?"\n**Achtung:** Die Angegebene Farbe wurde nicht erkannt! Versuche es mit einem Farbcode erneut.":"")).set_flags(dpp::message_flags::m_ephemeral));
|
||||
|
|
Loading…
Add table
Reference in a new issue