diff options
Diffstat (limited to 'src/abaddon.cpp')
-rw-r--r-- | src/abaddon.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/abaddon.cpp b/src/abaddon.cpp index fe37251..6dda3f5 100644 --- a/src/abaddon.cpp +++ b/src/abaddon.cpp @@ -696,6 +696,10 @@ void Abaddon::ActionChatLoadHistory(Snowflake id) { 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 + + if (!channel.IsValid()) return; + if (!m_discord.HasChannelPermission(m_discord.GetUserData().ID, channel, Permission::VIEW_CHANNEL)) return; + if (referenced_message.IsValid()) m_discord.SendChatMessage(msg, channel, referenced_message); else |