qwtf_discord_bot 5.5.18 → 5.5.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +9 -9
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/dashboard.rb +7 -7
- data/lib/qstat_request.rb +2 -2
- data/lib/qwtf_discord_bot/qwtf_discord_bot_pug.rb +6 -14
- data/qwtf_discord_bot.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b79b320ef30f15f7f58d33b455bf9e51fc1799bf841d5de4a1df80cb9dbe4e6c
|
4
|
+
data.tar.gz: f64fb0a100846c24727ce10d81be331a38ee691f90363ac5be66a01299c8a15c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9dd18bd7aaa529d247ab3299fc16c3464a2b3211e9f979655865c31113caa52401cc551b3b2bff22114dfb0751ffa13717d8f3815f8f0d3f753bc009a57a59c
|
7
|
+
data.tar.gz: b657aa11ac84a7bf7f25b70c34ffa6b94993d175a768c467e723925aa4d506b72ae65a485b6b63b19e3b77adb854b9b8365da121cacf6f1da84de26a794714d1
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
qwtf_discord_bot (5.5.
|
5
|
-
discordrb
|
6
|
-
redis
|
7
|
-
thor
|
4
|
+
qwtf_discord_bot (5.5.23)
|
5
|
+
discordrb (= 3.4.0)
|
6
|
+
redis (~> 4.2)
|
7
|
+
thor (~> 1.1)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -18,14 +18,14 @@ GEM
|
|
18
18
|
coderay (1.1.3)
|
19
19
|
concurrent-ruby (1.1.8)
|
20
20
|
diff-lcs (1.4.4)
|
21
|
-
discordrb (3.4.
|
22
|
-
discordrb-webhooks (~> 3.
|
21
|
+
discordrb (3.4.0)
|
22
|
+
discordrb-webhooks (~> 3.3.0)
|
23
23
|
ffi (>= 1.9.24)
|
24
24
|
opus-ruby
|
25
25
|
rest-client (>= 2.0.0)
|
26
26
|
websocket-client-simple (>= 0.3.0)
|
27
|
-
discordrb-webhooks (3.
|
28
|
-
rest-client (>= 2.0.
|
27
|
+
discordrb-webhooks (3.3.0)
|
28
|
+
rest-client (>= 2.1.0.rc1)
|
29
29
|
domain_name (0.5.20190701)
|
30
30
|
unf (>= 0.0.5, < 1.0.0)
|
31
31
|
event_emitter (0.2.6)
|
@@ -84,7 +84,7 @@ PLATFORMS
|
|
84
84
|
|
85
85
|
DEPENDENCIES
|
86
86
|
bundler
|
87
|
-
discordrb
|
87
|
+
discordrb (= 3.4.0)
|
88
88
|
factory_bot
|
89
89
|
pry
|
90
90
|
qwtf_discord_bot!
|
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.5.
|
1
|
+
5.5.23
|
data/lib/dashboard.rb
CHANGED
@@ -2,6 +2,8 @@ class Dashboard
|
|
2
2
|
def initialize(dashboard_config, bot)
|
3
3
|
@server = bot.server(dashboard_config["server_id"])
|
4
4
|
@endpoints = dashboard_config["endpoints"]
|
5
|
+
@messages = {}
|
6
|
+
|
5
7
|
|
6
8
|
channel_name = dashboard_config["name"]
|
7
9
|
|
@@ -32,15 +34,13 @@ class Dashboard
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def update
|
35
|
-
messages = {}
|
36
|
-
|
37
37
|
@endpoints.each do |endpoint|
|
38
38
|
qstat_request = QstatRequest.new(endpoint)
|
39
39
|
|
40
40
|
if qstat_request.is_empty?
|
41
|
-
if messages[endpoint]
|
42
|
-
messages[endpoint].delete
|
43
|
-
messages.delete(endpoint)
|
41
|
+
if @messages[endpoint]
|
42
|
+
@messages[endpoint].delete
|
43
|
+
@messages.delete(endpoint)
|
44
44
|
end
|
45
45
|
|
46
46
|
next
|
@@ -48,8 +48,8 @@ class Dashboard
|
|
48
48
|
|
49
49
|
embed = qstat_request.to_full_embed
|
50
50
|
|
51
|
-
messages[endpoint] = if messages[endpoint]
|
52
|
-
messages[endpoint].edit(nil, embed)
|
51
|
+
@messages[endpoint] = if @messages[endpoint]
|
52
|
+
@messages[endpoint].edit(nil, embed)
|
53
53
|
else
|
54
54
|
@channel.send_embed(nil, embed)
|
55
55
|
end
|
data/lib/qstat_request.rb
CHANGED
@@ -17,7 +17,7 @@ class QstatRequest
|
|
17
17
|
embed = Discordrb::Webhooks::Embed.new
|
18
18
|
|
19
19
|
teams.each do |team|
|
20
|
-
embed.add_field
|
20
|
+
embed.add_field << team.to_embed_field
|
21
21
|
end
|
22
22
|
|
23
23
|
embed
|
@@ -31,7 +31,7 @@ class QstatRequest
|
|
31
31
|
)
|
32
32
|
|
33
33
|
teams.each do |team|
|
34
|
-
embed
|
34
|
+
embed << team.to_embed_field
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -735,13 +735,9 @@ class QwtfDiscordBotPug # :nodoc:
|
|
735
735
|
end
|
736
736
|
|
737
737
|
embed.add_field(
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
name: team_name(team_no),
|
742
|
-
value: team_display_names.join("\n")
|
743
|
-
}
|
744
|
-
)
|
738
|
+
inline: true,
|
739
|
+
name: team_name(team_no),
|
740
|
+
value: team_display_names.join("\n")
|
745
741
|
)
|
746
742
|
end
|
747
743
|
end
|
@@ -775,13 +771,9 @@ class QwtfDiscordBotPug # :nodoc:
|
|
775
771
|
end
|
776
772
|
|
777
773
|
embed.add_field(
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
name: team_name(team_no),
|
782
|
-
value: team_mentions.join("\n")
|
783
|
-
}
|
784
|
-
)
|
774
|
+
inline: true,
|
775
|
+
name: team_name(team_no),
|
776
|
+
value: team_mentions.join("\n")
|
785
777
|
)
|
786
778
|
end
|
787
779
|
end
|
data/qwtf_discord_bot.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
|
-
spec.add_runtime_dependency 'discordrb', '
|
30
|
+
spec.add_runtime_dependency 'discordrb', '3.4.0'
|
31
31
|
spec.add_runtime_dependency 'redis', '~> 4.2'
|
32
32
|
spec.add_runtime_dependency 'thor', '~>1.1'
|
33
33
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qwtf_discord_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.5.
|
4
|
+
version: 5.5.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sheldon Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: discordrb
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.4.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.4.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: redis
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|