Skip to content

Commit

Permalink
fix type issues and oops forgot global metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Exirel committed Oct 18, 2024
1 parent e7a3ec1 commit 440ec4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sopel/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ def rate_limit_info(
rate_limit_type = "user"
rate_limit = rule.user_rate_limit
metrics = rule.get_user_metrics(nick)
elif is_channel and rule.is_channel_rate_limited(channel, at_time):
elif channel and rule.is_channel_rate_limited(channel, at_time):
template = rule.channel_rate_template
rate_limit_type = "channel"
rate_limit = rule.channel_rate_limit
Expand All @@ -614,7 +614,7 @@ def rate_limit_info(
template = rule.global_rate_template
rate_limit_type = "global"
rate_limit = rule.global_rate_limit
metrics = global_metrics
metrics = rule.get_global_metrics()
else:
return False, None

Expand Down

0 comments on commit 440ec4b

Please sign in to comment.