From 927acfb9fe9232ae05cdae165393a60e9419d30f Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 14 Mar 2021 17:59:52 -0500 Subject: add ability to create replies --- abaddon.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'abaddon.cpp') diff --git a/abaddon.cpp b/abaddon.cpp index 7fc474b..bbe1080 100644 --- a/abaddon.cpp +++ b/abaddon.cpp @@ -464,10 +464,13 @@ void Abaddon::ActionChatLoadHistory(Snowflake id) { }); } -void Abaddon::ActionChatInputSubmit(std::string msg, Snowflake channel) { +void Abaddon::ActionChatInputSubmit(std::string msg, Snowflake channel, Snowflake referenced_message) { if (msg.substr(0, 7) == "/shrug " || msg == "/shrug") msg = msg.substr(6) + "\xC2\xAF\x5C\x5F\x28\xE3\x83\x84\x29\x5F\x2F\xC2\xAF"; // this is important - m_discord.SendChatMessage(msg, channel); + if (referenced_message.IsValid()) + m_discord.SendChatMessage(msg, channel, referenced_message); + else + m_discord.SendChatMessage(msg, channel); } void Abaddon::ActionChatDeleteMessage(Snowflake channel_id, Snowflake id) { -- cgit v1.2.3