rubydium 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubydium/bot.rb +1 -0
- data/lib/rubydium/mixins/message_sending.rb +7 -7
- data/lib/rubydium/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: f2a77cb279ad0d586b2d071f893fe2ea50189f016002c1582309698e3b04d447
|
4
|
+
data.tar.gz: eda4c5570c608ecdaf31e4731808532b68cc9edd58bda94af3c1d9c08c5e665a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea97d3e9a465f3cd5b47e8b74896d7d60d6c5c4788d3ab967a10d52c3bde820310c4b997f52cb13d1f6da8db6b6fdc725a8efc48f4d8ff7c99ad225a8404479c
|
7
|
+
data.tar.gz: adb5e1eeb8cab687442ab398f9c8d26c8f2ab7decab3ae5f3a082581e65d038ab467a146af3e0adf9882212329e4c99501487394d30279a5a38ff6df3c136184
|
data/lib/rubydium/bot.rb
CHANGED
@@ -41,6 +41,7 @@ module Rubydium
|
|
41
41
|
@command = get_command(@msg.text)
|
42
42
|
@text_without_command = @text.gsub(@command.to_s, '').gsub(/@#{config.bot_username}\b/, '').strip
|
43
43
|
@text_without_bot_mentions = @text.gsub(/@#{config.bot_username}\b/, '')
|
44
|
+
@topic_id = @msg.message_thread_id if @chat.is_forum
|
44
45
|
end
|
45
46
|
|
46
47
|
def handle_update
|
@@ -7,7 +7,7 @@ module Rubydium
|
|
7
7
|
def send_message(text)
|
8
8
|
@api.send_message(
|
9
9
|
chat_id: @chat.id,
|
10
|
-
message_thread_id: @
|
10
|
+
message_thread_id: @topic_id,
|
11
11
|
text: text
|
12
12
|
)
|
13
13
|
end
|
@@ -17,7 +17,7 @@ module Rubydium
|
|
17
17
|
|
18
18
|
@api.send_sticker(
|
19
19
|
chat_id: @chat.id,
|
20
|
-
message_thread_id: @
|
20
|
+
message_thread_id: @topic_id,
|
21
21
|
sticker: sticker,
|
22
22
|
**kwargs
|
23
23
|
)
|
@@ -34,7 +34,7 @@ module Rubydium
|
|
34
34
|
@api.send_chat_action(
|
35
35
|
chat_id: @chat.id,
|
36
36
|
action: action,
|
37
|
-
message_thread_id: @
|
37
|
+
message_thread_id: @topic_id,
|
38
38
|
**kwargs
|
39
39
|
)
|
40
40
|
end
|
@@ -44,7 +44,7 @@ module Rubydium
|
|
44
44
|
|
45
45
|
@api.send_video(
|
46
46
|
chat_id: @chat.id,
|
47
|
-
message_thread_id: @
|
47
|
+
message_thread_id: @topic_id,
|
48
48
|
video: video,
|
49
49
|
**kwargs
|
50
50
|
)
|
@@ -55,7 +55,7 @@ module Rubydium
|
|
55
55
|
|
56
56
|
@api.send_photo(
|
57
57
|
chat_id: @chat.id,
|
58
|
-
message_thread_id: @
|
58
|
+
message_thread_id: @topic_id,
|
59
59
|
photo: photo,
|
60
60
|
**kwargs
|
61
61
|
)
|
@@ -64,7 +64,7 @@ module Rubydium
|
|
64
64
|
def reply(text, **args)
|
65
65
|
@api.send_message(
|
66
66
|
chat_id: @chat.id,
|
67
|
-
message_thread_id: @
|
67
|
+
message_thread_id: @topic_id,
|
68
68
|
reply_to_message_id: @message_id,
|
69
69
|
text: text,
|
70
70
|
**args
|
@@ -78,7 +78,7 @@ module Rubydium
|
|
78
78
|
def reply_to_target(text)
|
79
79
|
@api.send_message(
|
80
80
|
chat_id: @chat.id,
|
81
|
-
message_thread_id: @
|
81
|
+
message_thread_id: @topic_id,
|
82
82
|
reply_to_message_id: @replies_to.message_id,
|
83
83
|
text: text
|
84
84
|
)
|
data/lib/rubydium/version.rb
CHANGED