diff --git a/include/sleepy_discord/client.h b/include/sleepy_discord/client.h index 85dd5755d..b75be3999 100644 --- a/include/sleepy_discord/client.h +++ b/include/sleepy_discord/client.h @@ -257,7 +257,7 @@ namespace SleepyDiscord { //For Convenience inline ObjectResponse editMessage(Message message, std::string newMessage, std::vector embeds = {}) { return editMessage(message.channelID, message.ID, newMessage, embeds); } inline ObjectResponse sendMessage(Snowflake channelID, std::string message, RequestSettings> settings) { - return sendMessage(channelID, message, {}, MessageReference{}, TTS::Default, settings); + return sendMessage(channelID, message, std::vector{}, MessageReference{}, TTS::Default, settings); } //server functions diff --git a/sleepy_discord/endpoints.cpp b/sleepy_discord/endpoints.cpp index 9da8344fe..47b21c4cc 100644 --- a/sleepy_discord/endpoints.cpp +++ b/sleepy_discord/endpoints.cpp @@ -49,7 +49,7 @@ namespace SleepyDiscord { } ObjectResponse BaseDiscordClient::sendMessage(Snowflake channelID, std::string message, Embed embed, MessageReference replyingTo, TTS tts, RequestSettings> settings) { - return ObjectResponse{ request(Post, path("channels/{channel.id}/messages", { channelID }), settings, createMessageBody(message, embed.empty() ? {} : { embed }, replyingTo, tts)) } + return ObjectResponse{ request(Post, path("channels/{channel.id}/messages", { channelID }), settings, createMessageBody(message, embed.empty() ? std::vector() : std::vector({ std::move(embed) }), replyingTo, tts)) }; } ObjectResponse BaseDiscordClient::sendMessage(SendMessageParams params, RequestSettings> settings) {