Last active
December 27, 2017 22:49
-
-
Save june29/65e7ca6a4aed08d513f01753b62c22a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gem::Specification.new do |spec| | |
spec.name = "ruboty-pepabo-kokugo" | |
spec.version = "0.0.4" | |
spec.authors = ["Jun OHWADA"] | |
spec.email = ["[email protected]"] | |
spec.summary = "Pepabo Kokugo" | |
spec.files = ["ruboty-pepabo-kokugo.rb"] | |
spec.require_path = "." | |
spec.add_development_dependency "pepabo-kokugo" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pepabo/kokugo' | |
module Ruboty | |
module Handlers | |
class PepaboKokugo < Base | |
on( | |
//, | |
all: true, | |
name: "pepabo_kokugo", | |
description: "ペパボこくご" | |
) | |
def pepabo_kokugo(message) | |
return if message.body =~ /uploaded a file/ | |
message.reply(Pepabo::Kokugo.new.convert(message.body)) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment