summaryrefslogtreecommitdiff
path: root/components/ratelimitindicator.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-04-14 02:59:57 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2021-04-14 02:59:57 -0400
commitf5df43194e19be7995d753c5e9dd0a5a9365f24a (patch)
treebb32b0f3b159f4b7b6a9d9467e6d364a6443c0a1 /components/ratelimitindicator.hpp
parent9733ae54c386f347e338c7854869ba2e57b113cb (diff)
downloadabaddon-portaudio-f5df43194e19be7995d753c5e9dd0a5a9365f24a.tar.gz
abaddon-portaudio-f5df43194e19be7995d753c5e9dd0a5a9365f24a.zip
handle more of discord's quirky way of doing slowmode
also has the side effect of reducing db hits a little bit
Diffstat (limited to 'components/ratelimitindicator.hpp')
-rw-r--r--components/ratelimitindicator.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/ratelimitindicator.hpp b/components/ratelimitindicator.hpp
index 95dddb6..d6ada43 100644
--- a/components/ratelimitindicator.hpp
+++ b/components/ratelimitindicator.hpp
@@ -18,6 +18,7 @@ private:
bool UpdateIndicator();
void OnMessageCreate(const Message &message);
void OnMessageSendFail(const std::string &nonce, float rate_limit);
+ void OnChannelUpdate(Snowflake channel_id);
Gtk::Image m_img;
Gtk::Label m_label;
@@ -26,5 +27,5 @@ private:
int m_rate_limit;
Snowflake m_active_channel;
- std::unordered_map<Snowflake, std::chrono::time_point<std::chrono::steady_clock>> m_times;
+ std::unordered_map<Snowflake, std::chrono::time_point<std::chrono::steady_clock>> m_times; // time point of when next message can be sent
};