Sha256: 6f962ddc5130736c3447442839fb0f8494ad089b9510292918fb2708a08373e9
Contents?: true
Size: 461 Bytes
Versions: 3
Compression:
Stored size: 461 Bytes
Contents
#!/usr/bin/env ruby require "./lib/boty" def set_locale(locale) begin Boty.locale = locale || :en rescue I18n::InvalidLocale Boty.locale = :en end Boty::Locale.reload end set_locale ARGV.pop session = Boty::Session.new session.start do |bot| bot.desc bot.name, I18n.t("template.presence", bot_name: bot.name) bot.hear(/#{bot.name}/i) do next if message_from_me? say I18n.t "template.hello", user_name: message.user.name end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
boty-0.0.17.1 | bin/bot |
boty-0.0.17 | bin/bot |
boty-0.0.16 | bin/bot |