qwtf_discord_bot 5.5.22 → 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.lock +1 -1
- data/VERSION +1 -1
- data/lib/dashboard.rb +7 -7
- 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: 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.lock
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
|