Sha256: 36accee91e3e2e435beb0fa67c3969a36c454810d716507c37106e6f0d73e3bd

Contents?: true

Size: 448 Bytes

Versions: 2

Compression:

Stored size: 448 Bytes

Contents

#!/usr/bin/env ruby
require "./<%= bot_name %>"

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

2 entries across 2 versions & 1 rubygems

Version Path
boty-1.0.1 template/project/bot.tt
boty-1.0.0 template/project/bot.tt