Sha256: ab59296ae95264b1715335ec3d5564a6eccb56d0bd141fe3968f4f5b8fee92c8

Contents?: true

Size: 437 Bytes

Versions: 4

Compression:

Stored size: 437 Bytes

Contents

#!/usr/bin/env ruby
require "./lib/boty"

Boty.locale = ARGV.pop || :en

Boty::Logger.adapter = Boty::Logger::Multi.new([
  Logger.new(STDOUT),
  Logger.new("log/output.log", "daily")
])

session = Boty::Session.new
session.start do
  desc name, I18n.t("template.presence", bot_name: name)
  hear(/#{name}/i) do
    next if message_from_me?
    logger.debug "saying hello"
    say I18n.t "template.hello", user_name: user.name
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
boty-0.2.0 bin/bot
boty-0.1.2 bin/bot
boty-0.1.1 bin/bot
boty-0.1.0 bin/bot