slack-smart-bot 1.13.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 19f7d9b931ce89bf4a626e953ffb63b1f98ee16e1b330c6fc3c1c24ff0899227
|
|
4
|
+
data.tar.gz: abe96da2c61b844398cfc0c7eb433094f826fa4fb659c0ef2f5c01effad21c23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 17e5a9feb8c2b3d6974bdfacb02640fcbd29a399def6fca52affd84c236b54d547ab4ebf85ca4f1d983e06afcc226f46c9b5d8e4b764998523b40c04cdd2f45e
|
|
7
|
+
data.tar.gz: 1cea00686dd66557aa71d9badee0ca9b734f4bdc26daef145554639417d137bc1c4cb212d6fcac4008bb7c026a48043245910a1001c4ee4a1a3dff05efc9f3d0
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
class SlackSmartBot
|
|
2
2
|
def event_hello()
|
|
3
|
+
@first_time_bot_started ||= true
|
|
3
4
|
unless config.simulate
|
|
4
5
|
m = "Successfully connected, welcome '#{client.self.name}' to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
|
|
5
6
|
puts m
|
|
@@ -18,7 +19,7 @@ class SlackSmartBot
|
|
|
18
19
|
version_message = ". There is a new available version: #{version_remote}."
|
|
19
20
|
end
|
|
20
21
|
if (!config[:silent] or ENV['BOT_SILENT'].to_s == 'false') and !config.simulate
|
|
21
|
-
unless ENV['BOT_SILENT']=='true'
|
|
22
|
+
unless ENV['BOT_SILENT']=='true' or !@first_time_bot_started
|
|
22
23
|
respond "Smart Bot started v#{VERSION}#{version_message}\nIf you want to know what I can do for you: `bot help`.\n`bot rules` if you want to display just the specific rules of this channel.\nYou can talk to me privately if you prefer it."
|
|
23
24
|
end
|
|
24
25
|
ENV['BOT_SILENT'] = 'true' if config[:silent] and ENV['BOT_SILENT'].to_s != 'true'
|
|
@@ -30,5 +31,6 @@ class SlackSmartBot
|
|
|
30
31
|
end
|
|
31
32
|
end
|
|
32
33
|
end
|
|
34
|
+
@first_time_bot_started = false
|
|
33
35
|
end
|
|
34
36
|
end
|
|
@@ -10,7 +10,7 @@ class SlackSmartBot
|
|
|
10
10
|
user_info = @users.select{|u| u.name == @routines[@channel_id][name][:creator]}[-1]
|
|
11
11
|
@routines[@channel_id][name][:creator_id] = user_info.id unless user_info.nil? or user_info.empty?
|
|
12
12
|
end
|
|
13
|
-
@logger.info "Routine: #{@routines[@channel_id][name].inspect}"
|
|
13
|
+
@logger.info "Routine #{name}: #{@routines[@channel_id][name].inspect}"
|
|
14
14
|
if @routines[@channel_id][name][:file_path].match?(/\.rb$/i)
|
|
15
15
|
ruby = "ruby "
|
|
16
16
|
else
|
|
@@ -188,6 +188,10 @@ class SlackSmartBot
|
|
|
188
188
|
update_routines()
|
|
189
189
|
sleep(@routines[@channel_id][name][:sleeping]) unless elapsed > every_in_seconds
|
|
190
190
|
else
|
|
191
|
+
if !@routines[@channel_id][name][:running]
|
|
192
|
+
@routines[@channel_id][name][:running] = true
|
|
193
|
+
update_routines()
|
|
194
|
+
end
|
|
191
195
|
sleep 30
|
|
192
196
|
end
|
|
193
197
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slack-smart-bot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.13.
|
|
4
|
+
version: 1.13.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mario Ruiz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-03-
|
|
11
|
+
date: 2023-03-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: slack-ruby-client
|