Module: Cinch::Plugin::ClassMethods

Defined in:
lib/cinch/plugin/hooks.rb

Overview

Add the pre hook to all messages triggered

Instance Method Summary collapse

Instance Method Details

#enforce_cooldownObject



7
8
9
10
11
# File 'lib/cinch/plugin/hooks.rb', line 7

def enforce_cooldown
  hook(:pre,
       for: [:match],
       method: ->(m) { Cooldowns.finished?(m, shared[:cooldown], @bot) })
end