Method: CeilingCat::Plugin::Messages#handle
- Defined in:
- lib/ceiling_cat/plugins/messages.rb
#handle ⇒ Object
handle manages a plugin’s entire interaction with an event. If you only want to execute commands - “![command]” - leave handle alone (or remove it and define commands below)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ceiling_cat/plugins/messages.rb', line 11 def handle if event.type == :entrance = [] = self.class.(user.name) if .size > 0 << "Hey #{user.name}! I have a message to deliver to you:" += .collect{|| "From #{message[:from]}: #{message[:body]}"} reply end self.class.remove() false else super end end |