kybus-bot 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7c076fdf29d45a346d07aa5639349a66cff1a83ed15f0cfbafc4e6d4698cbd9
|
4
|
+
data.tar.gz: 0fa6891cd37efd3a37b87b59e3dc90fd1628384c43863237e70ea6f757f2086a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f620f4d3674eb392f61f7a50abf378c1fa2fef5b718a93cf4ec1c340f906b1d924948f374fc0214d817664c26a97e4d5cdfa301c6588ba0c2e30bf5af8d7fb75
|
7
|
+
data.tar.gz: f2b708234bb392bfaf98d75f29720ea081ead5e3ea4cba36a7703abd9dcc7516e8328eb8f2583604c0de819e15c391ba1a7066cb3b74bf4ef39c0713186f6e96
|
@@ -159,7 +159,7 @@ module Kybus
|
|
159
159
|
end
|
160
160
|
|
161
161
|
# interface for sending messages
|
162
|
-
def send_message(
|
162
|
+
def send_message(contents, channel_name, attachment = nil)
|
163
163
|
channel(channel_name).answer(contents, attachment)
|
164
164
|
end
|
165
165
|
|
@@ -47,12 +47,12 @@ module Kybus
|
|
47
47
|
end
|
48
48
|
|
49
49
|
# interface for sending messages
|
50
|
-
def send_message(
|
50
|
+
def send_message(contents, channel_name)
|
51
51
|
puts "#{channel_name} => #{contents}" if @config['debug']
|
52
|
-
@client.api.send_message(chat_id: channel_name, text: contents)
|
52
|
+
@client.api.send_message(chat_id: channel_name.to_i, text: contents, parse_mode: @config['parse_mode'])
|
53
53
|
# :nocov:
|
54
54
|
rescue ::Telegram::Bot::Exceptions::ResponseError => e
|
55
|
-
return if e
|
55
|
+
return if e.error_code == '403'
|
56
56
|
end
|
57
57
|
# :nocov:
|
58
58
|
|
@@ -123,7 +123,7 @@ module Kybus
|
|
123
123
|
def ask_param(param, label = nil)
|
124
124
|
provider = bot.provider
|
125
125
|
msg = label || "I need you to tell me #{param}"
|
126
|
-
bot.send_message(provider.last_message.channel_id
|
126
|
+
bot.send_message(msg, provider.last_message.channel_id)
|
127
127
|
execution_context.next_param = param
|
128
128
|
end
|
129
129
|
end
|
@@ -15,7 +15,7 @@ module Kybus
|
|
15
15
|
def send_message(content, channel = nil)
|
16
16
|
raise(Base::EmptyMessageError) unless content
|
17
17
|
|
18
|
-
|
18
|
+
@bot.send_message(content, channel || current_channel)
|
19
19
|
end
|
20
20
|
|
21
21
|
def send_image(content, channel = nil, caption: nil)
|
data/lib/kybus/bot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kybus-bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gilberto Vargas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kybus-core
|