module Lobstersbot::Salute

Public Class Methods

included(mod) click to toggle source
# File lib/lobstersbot/plugins/salute.rb, line 13
def self.included(mod)
  handler = ->(bot, channel, _nick, _match) { bot.salute_user channel }
  mod.add_trigger(100, /\AV.v.V\z/i, handler)
end

Public Instance Methods

salute_user(channel) click to toggle source
# File lib/lobstersbot/plugins/salute.rb, line 6
def salute_user(channel)
  claws = @@claws.sample 2
  face = @@faces.sample
  lobster = claws[0] + face + claws[1]
  privmsg(lobster, channel)
end