qwtf_discord_bot 5.5.8 → 5.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/dashboard.rb +18 -5
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06567aa4454662e96cbae7770c8a597ede04411a67aef13d2b0c33d302764245
4
- data.tar.gz: edde03293e5e55dd1286211865963dc5207d99d66d229cfe8fb1c3ff1d50a6fa
3
+ metadata.gz: f422f497d757dbe1261a8dc201cf5888b289e00ca035e52fadc118a2d3712e2b
4
+ data.tar.gz: 2f13079b2d29f3e14cbfb6a0b77d366a056b25b4cafe39024d9ba257cc7f9f45
5
5
  SHA512:
6
- metadata.gz: e91adf93822c32750f90121bc73daa98bebd9557429efb06a38d743408c703d4d6666573e41c08469c13fe8bceaf6ec5f6b7540bb3a429b5bfa41ccfa64ca2d6
7
- data.tar.gz: 40feb730c272acbd1957bb0a340d6869740c2e41fed8b24d1f541050b59f9af778fdbf127ef5a43ddc789541e7053133d158db75c054860d7fe5360714ba8917
6
+ metadata.gz: 34215aa47c79a975411282e1c8bfdbc238696a52700994e3a7d0432169899df1d9c68419d16f20a3c2f302707fe9e55b8e5276433671d4200b2b45dac196dd09
7
+ data.tar.gz: 66dd099b4cf81b35d273dc49a40efacc9249163f9a4e715e43c5c2a708c40203af0d84a6d4c4aec648085f2fe3274417a2c82edf2ce79d450b1a8c57349c5525
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.5.8
1
+ 5.5.9
@@ -4,15 +4,28 @@ class Dashboard
4
4
  @endpoints = dashboard_config["endpoints"]
5
5
  @messages = {}
6
6
 
7
+ channel_name = dashboard_config["name"]
8
+
7
9
  old_dashboard_channel = @server.channels.find do |chan|
8
- chan.name == dashboard_config["name"] && chan.topic = "QWTF Bot Dashboard"
10
+ chan.name == channel_name
9
11
  end
10
12
 
11
- old_dashboard_channel && old_dashboard_channel.delete
13
+ @channel = if old_dashboard_channel
14
+ position = old_dashboard_channel.position
15
+ category = old_dashboard_channel.category
16
+ topic = old_dashboard_channel.topic
17
+ old_dashboard_channel.delete
12
18
 
13
- @channel = @server.create_channel(dashboard_config["name"])
14
- @channel.topic = "QWTF Bot Dashboard"
15
- @channel.position = dashboard_config["position"]
19
+ @server.create_channel(channel_name).tap do |channel|
20
+ channel.position = position
21
+ channel.category = category
22
+ channel.topic = topic
23
+ end
24
+ else
25
+ @server.create_channel(channel_name).tap do |channel|
26
+ channel.topic = "QWTF Bot Dashboard"
27
+ end
28
+ end
16
29
  end
17
30
 
18
31
  def update
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.8
4
+ version: 5.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheldon Johnson