Skip to content

Instantly share code, notes, and snippets.

@HHRy
Created August 26, 2010 13:29
Show Gist options
  • Save HHRy/551382 to your computer and use it in GitHub Desktop.
Save HHRy/551382 to your computer and use it in GitHub Desktop.
set :trigger_sign, '!'
on :privmsg, :in => :channel, :trigger => 'stuff' do |channel, user, message|
channel.message StuffMachine.random_entry
end
on :privmsg, :in => :channel, :trigger => 'findstuff' do |channel, user, message|
user.notice StuffMachine.find(message)
end
class StuffMachine
def self.random_entry
'The stuff machine wiggles and a hat falls out'
end
def self.find(something)
"I couldn't find anything"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment