ruboty-slack_reaction_added 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -0
- data/lib/ruboty/slack_reaction_added/handlers/handler.rb +3 -3
- data/lib/ruboty/slack_reaction_added/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fa3467178fcbd8e57038e4ce87ae1aecaa3f317004cec53e0d09d061f8b1ecc
|
4
|
+
data.tar.gz: 18c7b23d92ee9e0f0237caac719374f780749611ada0d01bca6b5d948ecaf9f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 397e0719aaadb26dac01e31e422611c661bf0e7604960a337858ae4a500574efbb22402470f30e15fcb2689f8a7b11138cce22dd3153040e8a6e6b517eb46a3e
|
7
|
+
data.tar.gz: 62b6e1c6b554900a04ef46d185968329c93a6ebce6ddf90ce39240513c3176f3c470d24f98e45db981ad019385d4b1f5c78d45256c916a2bf87003c7107e56d2
|
data/README.md
CHANGED
@@ -1,5 +1,37 @@
|
|
1
1
|
# ruboty-slack_reaction_added
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/ruboty-slack_reaction_added.svg)](https://badge.fury.io/rb/ruboty-slack_reaction_added)
|
4
|
+
|
3
5
|
Slack Reaction added event extension for [RubotySlackRTM][].
|
4
6
|
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
gem 'ruboty-slack_reaction_added'
|
12
|
+
|
13
|
+
## ENV
|
14
|
+
|
15
|
+
* `DISABLE_DEFAULT_REACTION_HANDLERS` : Disable ruboty-slack_reaction_added handlers
|
16
|
+
* `@bot reaction ping` message reaction added: reply pong again
|
17
|
+
* `@bot reaction name` message reaction added: reply reaction name
|
18
|
+
* :bookmark: reaction : reply permalink
|
19
|
+
* :+1: reaction : bot +1
|
20
|
+
|
21
|
+
## Handler options
|
22
|
+
|
23
|
+
* `allow_reaction` : handler is also called on the event to which the reaction_added
|
24
|
+
* `raction_only` : handler will only be called on the event to which the reaction_added
|
25
|
+
|
26
|
+
## Message
|
27
|
+
|
28
|
+
* `message.reaction` : get reaction name
|
29
|
+
* `message.reaction_by`: get reaction_added user name
|
30
|
+
|
31
|
+
## Example
|
32
|
+
|
33
|
+
https://github.com/srz-zumix/ruboty-slack_reaction_added/blob/main/lib/ruboty/slack_reaction_added/handlers/handler.rb
|
34
|
+
|
35
|
+
![Example](https://user-images.githubusercontent.com/1439172/110792563-ebffca00-82b6-11eb-928a-741de77659b9.png)
|
36
|
+
|
5
37
|
[RubotySlackRTM]:https://github.com/rosylilly/ruboty-slack_rtm
|
@@ -8,7 +8,7 @@ module Ruboty
|
|
8
8
|
module Handlers
|
9
9
|
class Handler < Ruboty::Handlers::Base
|
10
10
|
|
11
|
-
on /ping\z/,
|
11
|
+
on /reaction ping\z/,
|
12
12
|
name: 'reaction_able_ping',
|
13
13
|
description: 'ping allow reaction',
|
14
14
|
allow_reaction: true
|
@@ -18,13 +18,13 @@ module Ruboty
|
|
18
18
|
description: 'reaction name say on readciont_added',
|
19
19
|
reaction_only: true
|
20
20
|
|
21
|
-
on /.*\z
|
21
|
+
on /.*\z/m,
|
22
22
|
name: 'thumbup',
|
23
23
|
description: 'thumbup',
|
24
24
|
reaction_only: true,
|
25
25
|
all: true
|
26
26
|
|
27
|
-
on /.*\z
|
27
|
+
on /.*\z/m,
|
28
28
|
name: 'permalink',
|
29
29
|
description: 'permalink',
|
30
30
|
reaction_only: true,
|