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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/VERSION +1 -1
  4. data/lib/dashboard.rb +7 -7
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8935dcbd9f811d2277081ce9d92ae0ae7818663212f5858a897e47d799d6765c
4
- data.tar.gz: bc16097b879c0ab8ed026e1a42ce0ca981b333280ce96a62f320ac4f80250f1a
3
+ metadata.gz: b79b320ef30f15f7f58d33b455bf9e51fc1799bf841d5de4a1df80cb9dbe4e6c
4
+ data.tar.gz: f64fb0a100846c24727ce10d81be331a38ee691f90363ac5be66a01299c8a15c
5
5
  SHA512:
6
- metadata.gz: a04f4e900ed5011cd7abfab2a13f9c501600e0a6c6a4e6ee6623f6e32cd2c5aaba7452e01609b1dc3ac9441f22af0ace8035d47ca0bf2b7f0d3eb5f5711034e8
7
- data.tar.gz: a932142714804658be6725f0f6f2e5f3236e740204e3c58cfd8bf971ee27cd95bd8d6342cacade9a3c42ef59490a852f20588c73ecd82e78fd41d073321b9a25
6
+ metadata.gz: d9dd18bd7aaa529d247ab3299fc16c3464a2b3211e9f979655865c31113caa52401cc551b3b2bff22114dfb0751ffa13717d8f3815f8f0d3f753bc009a57a59c
7
+ data.tar.gz: b657aa11ac84a7bf7f25b70c34ffa6b94993d175a768c467e723925aa4d506b72ae65a485b6b63b19e3b77adb854b9b8365da121cacf6f1da84de26a794714d1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qwtf_discord_bot (5.5.21)
4
+ qwtf_discord_bot (5.5.23)
5
5
  discordrb (= 3.4.0)
6
6
  redis (~> 4.2)
7
7
  thor (~> 1.1)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.5.22
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qwtf_discord_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.22
4
+ version: 5.5.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheldon Johnson