module RabbotMetaAiCooldown
Constants
- EXEMPT_BOT_NICKS
-
Registered bot operators — exempt from !ai per-user cooldown (see
RabbotUser).
Public Instance Methods
Source
# File lib/rabbot_meta_ai_cooldown.rb, line 22 def exempt?(network:, channel:, nick:, store: RabbotDb) return false if network.to_s.strip.empty? || channel.to_s.strip.empty? || nick.to_s.strip.empty? store.registered?(network: network, channel: channel, nick: nick) || exempt_nick?(nick) end
Source
# File lib/rabbot_meta_ai_cooldown.rb, line 28 def exempt_nick?(nick) key = Normalize.user_key(nick) return false if key.empty? EXEMPT_BOT_NICKS.any? { |candidate| Normalize.user_key(candidate) == key } end