hahamut 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/lib/hahamut/message.rb +2 -2
- data/lib/hahamut/support.rb +1 -1
- data/lib/hahamut/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98620782f122c735b1b8d86d1df26c30eb6d78e691b6d885b23b9f4241d8ea2b
|
4
|
+
data.tar.gz: 87b96823c30bbf69dcc7f090e78ffd3a3d8fd7d8bc98ad2265ce3ac53f1bc196
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e8053cb4e11ad3ccca28f83fd7b0928be280fad85f254bf881037ba3655c85ee540f2f579e8faeb73a4c87ae75e3e7d2e5a13215da982345ef70c19e5757678
|
7
|
+
data.tar.gz: 53f034ece4d1dc3978583e6f26ca5238ce4455fae8187505eb0c4758b1902bc7d7a03d3512c7a00c4a0921b1913f211f34f5f6f8754acf280e12df57cba3d47e
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -65,11 +65,11 @@ Hahamut::Engine.setup do |config|
|
|
65
65
|
end
|
66
66
|
|
67
67
|
# Option 2
|
68
|
-
config.
|
68
|
+
config.handler = ChatbotHandler
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
-
> If you want to use the handler object, you must implement a
|
72
|
+
> If you want to use the handler object, you must implement a `#call` method
|
73
73
|
|
74
74
|
### Sending Message
|
75
75
|
|
@@ -86,7 +86,7 @@ To send a message, you have to use bot instance to send a message object.
|
|
86
86
|
|
87
87
|
```ruby
|
88
88
|
message = Hahamut::Message::Text.new(text: 'Hello World')
|
89
|
-
bot.send_to '
|
89
|
+
bot.send_to 'RECIPIENT_ID', message
|
90
90
|
```
|
91
91
|
|
92
92
|
> BotStart can accept `init` attribute with BotEvent, it can help you write less JSON for it.
|
@@ -99,7 +99,7 @@ The result is a `Hahamut::Message::Image` object and you can send to the user di
|
|
99
99
|
|
100
100
|
```ruby
|
101
101
|
image = bot.upload('IMAGE_PATH')
|
102
|
-
bot.send_to '
|
102
|
+
bot.send_to 'RECIPIENT_ID', image
|
103
103
|
```
|
104
104
|
|
105
105
|
## Development
|
data/lib/hahamut/message.rb
CHANGED
@@ -5,8 +5,8 @@ require 'hahamut/message/text'
|
|
5
5
|
require 'hahamut/message/image'
|
6
6
|
require 'hahamut/message/sticker'
|
7
7
|
require 'hahamut/message/command'
|
8
|
-
require '
|
9
|
-
require '
|
8
|
+
require 'hahamut/message/bot_start'
|
9
|
+
require 'hahamut/message/bot_event'
|
10
10
|
|
11
11
|
module Hahamut
|
12
12
|
# Hahamut Message
|
data/lib/hahamut/support.rb
CHANGED
data/lib/hahamut/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hahamut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 蒼時弦也
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|