Skip to content

Commit 440ec4b

Browse files
committed
fix type issues and oops forgot global metrics
1 parent e7a3ec1 commit 440ec4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sopel/bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def rate_limit_info(
605605
rate_limit_type = "user"
606606
rate_limit = rule.user_rate_limit
607607
metrics = rule.get_user_metrics(nick)
608-
elif is_channel and rule.is_channel_rate_limited(channel, at_time):
608+
elif channel and rule.is_channel_rate_limited(channel, at_time):
609609
template = rule.channel_rate_template
610610
rate_limit_type = "channel"
611611
rate_limit = rule.channel_rate_limit
@@ -614,7 +614,7 @@ def rate_limit_info(
614614
template = rule.global_rate_template
615615
rate_limit_type = "global"
616616
rate_limit = rule.global_rate_limit
617-
metrics = global_metrics
617+
metrics = rule.get_global_metrics()
618618
else:
619619
return False, None
620620

0 commit comments

Comments
 (0)