diff --git a/sopel/bot.py b/sopel/bot.py index 05c7ecac9..bcdd6df93 100644 --- a/sopel/bot.py +++ b/sopel/bot.py @@ -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 @@ -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