Sha256: 0d5a2da166aff5bffc84103c33d2b0f0c1e6dcae5df3b99bd6a2edbd1b3168ec

Contents?: true

Size: 260 Bytes

Versions: 4

Compression:

Stored size: 260 Bytes

Contents

require 'slack-ruby-bot'

class WeatherBot < SlackRubyBot::Bot
  match(/^How is the weather in (?<location>\w*)\?$/i) do |client, data, match|
    client.say(channel: data.channel, text: "The weather in #{match[:location]} is nice.")
  end
end

WeatherBot.run

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
slack-ruby-bot-0.7.0 examples/weather/weatherbot.rb
slack-ruby-bot-0.6.2 examples/weather/weatherbot.rb
slack-ruby-bot-0.6.1 examples/weather/weatherbot.rb
slack-ruby-bot-0.6.0 examples/weather/weatherbot.rb