Skip to content

Instantly share code, notes, and snippets.

@adamjleonard
Created February 12, 2018 02:32
Show Gist options
  • Save adamjleonard/84144be50ed0db690411070823087ef1 to your computer and use it in GitHub Desktop.
Save adamjleonard/84144be50ed0db690411070823087ef1 to your computer and use it in GitHub Desktop.
require ‘slack-ruby-bot’
class HelloWorldBot < SlackRubyBot::Bot
match /greet ([A-Za-z]*)/ do |client, data, match|
client.say(text: “Hello #{match[1]}”, channel: data.channel)
  end
end
HelloWorldBot.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment