mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-04 11:33:27 +03:00
fix RateLimitIndicator picking up updates from other channels
This commit is contained in:
@@ -124,7 +124,10 @@ void RateLimitIndicator::OnMessageSendFail(const std::string &nonce, float retry
|
||||
}
|
||||
|
||||
void RateLimitIndicator::OnChannelUpdate(Snowflake channel_id) {
|
||||
const auto r = Abaddon::Get().GetDiscordClient().GetChannel(channel_id)->RateLimitPerUser;
|
||||
if (channel_id != m_active_channel) return;
|
||||
const auto chan = Abaddon::Get().GetDiscordClient().GetChannel(m_active_channel);
|
||||
if (!chan.has_value()) return;
|
||||
const auto r = chan->RateLimitPerUser;
|
||||
if (r.has_value())
|
||||
m_rate_limit = *r;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user