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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/dashboard.rb +18 -5
- 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: f422f497d757dbe1261a8dc201cf5888b289e00ca035e52fadc118a2d3712e2b
|
4
|
+
data.tar.gz: 2f13079b2d29f3e14cbfb6a0b77d366a056b25b4cafe39024d9ba257cc7f9f45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34215aa47c79a975411282e1c8bfdbc238696a52700994e3a7d0432169899df1d9c68419d16f20a3c2f302707fe9e55b8e5276433671d4200b2b45dac196dd09
|
7
|
+
data.tar.gz: 66dd099b4cf81b35d273dc49a40efacc9249163f9a4e715e43c5c2a708c40203af0d84a6d4c4aec648085f2fe3274417a2c82edf2ce79d450b1a8c57349c5525
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.5.
|
1
|
+
5.5.9
|
data/lib/dashboard.rb
CHANGED
@@ -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 ==
|
10
|
+
chan.name == channel_name
|
9
11
|
end
|
10
12
|
|
11
|
-
|
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
|
-
|
14
|
-
|
15
|
-
|
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
|