Skip to content

Instantly share code, notes, and snippets.

@zeero
Last active December 17, 2016 10:30
Show Gist options
  • Save zeero/358bab1251b738f680002a9e844af1df to your computer and use it in GitHub Desktop.
Save zeero/358bab1251b738f680002a9e844af1df to your computer and use it in GitHub Desktop.
#ruboty #rubygems
Gem::Specification.new do |spec|
spec.name = "ruboty-helloworld"
spec.version = "0.0.2"
spec.authors = ["zeero"]
spec.email = ["zeero26@gmail.com"]
spec.summary = "Hello world!"
spec.files = ["ruboty-helloworld.rb"]
spec.require_path = "."
end
module Ruboty
module Handlers
class HelloWorld < Base
on(
/hello/,
name: "hello", # method name
description: "Hello world!" # help description
)
def hello(message)
message.reply("Hello world!")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment