qwtf_discord_bot 5.5.25 → 5.5.26

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/README.md +2 -2
  3. data/VERSION +1 -1
  4. data/lib/qstat_request.rb +28 -28
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d52936b5b37ec73ab1ff18e5d94a0df663d447181128a5f981f64d1f8825aac
4
- data.tar.gz: 8e6e8bf18c681875d97e49f6480984f7b702405c85435a1e77be8491b5db4cd5
3
+ metadata.gz: 9c6d6a935efeff277da0a093cc9cbbca7dd76e33a8d4d8f0bf73664d32f7b766
4
+ data.tar.gz: c0ab537abc9fbe1c3f133e0eedf076348cbd5d1bad622bcc6e2cbc7a233421f2
5
5
  SHA512:
6
- metadata.gz: cfc50cb1f497ff1428986370e6aae8f5e507ad5ede8317075a15a1e0b52e487ab41367af4d3167a44080b0e95b5a5d2c85c34b579431928180c981ae98474c42
7
- data.tar.gz: 462efd6d2e12a17f389bf7d9a94e6da4e7104291098bd080125e9b7f9a38cefe0414a13ce9a10e90a3d0deda429e01af047a7e29b0f94a0294c141f135803622
6
+ metadata.gz: ba9d17f6b5b3f5a69e97594135cf1b87463cabcaf55e18dbf1e72e89d6f01d2594f9281042f4fdd0d3f43e3c58c822167094d74c2dfbea87c11f08df67d20702
7
+ data.tar.gz: a12523817d0bb96dbffbcc2e038a862615412117b53dee96486085836be04ea70a1a3f42fe28e8d1f4a451bd60633d3f416670ab52b43ab0927c5328411cd919
data/README.md CHANGED
@@ -180,8 +180,8 @@ Build:
180
180
 
181
181
  Push:
182
182
 
183
- docker tag discord-bot fortressone/discord-bot:latest
184
- docker push fortressone/discord-bot:latest
183
+ docker tag discord-bot fortressone/discord-bot:latest \
184
+ && docker push fortressone/discord-bot:latest
185
185
 
186
186
 
187
187
  Create AWS instance:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.5.25
1
+ 5.5.26
data/lib/qstat_request.rb CHANGED
@@ -45,39 +45,39 @@ class QstatRequest
45
45
  def server_summary
46
46
  return "#{@endpoint} isn't responding" unless game_map
47
47
 
48
- if !has_spectators?
49
- return [
50
- name,
51
- @endpoint,
52
- game_map,
53
- "#{numplayers}/#{maxplayers}"
54
- ].join(MSG_SNIPPET_DELIMITER)
55
- end
48
+ info = [name, @endpoint, game_map]
49
+
50
+ info += if !has_spectators?
51
+ ["#{numplayers}/#{maxplayers}"]
52
+ else
53
+ [
54
+ "#{numplayers}/#{maxplayers} players",
55
+ "#{numspectators}/#{maxspectators} spectators"
56
+ ]
57
+ end
58
+
59
+ info.join(MSG_SNIPPET_DELIMITER)
60
+ end
56
61
 
57
- [
58
- name,
59
- @endpoint,
60
- game_map,
61
- "#{numplayers}/#{maxplayers} players",
62
- "#{numspectators}/#{maxspectators} spectators"
63
- ].join(MSG_SNIPPET_DELIMITER)
62
+ def join_link
63
+ "[Join](http://phobos.baseq.fr:9999/join?url=#{@endpoint})"
64
64
  end
65
65
 
66
66
  def embed_summary
67
- if !has_spectators?
68
- return [
69
- @endpoint,
70
- game_map,
71
- "#{numplayers}/#{maxplayers}"
72
- ].join(MSG_SNIPPET_DELIMITER)
73
- end
67
+ info = [@endpoint, game_map]
68
+
69
+ info += if !has_spectators?
70
+ ["#{numplayers}/#{maxplayers}"]
71
+ else
72
+ [
73
+ "#{numplayers}/#{maxplayers} players",
74
+ "#{numspectators}/#{maxspectators} spectators"
75
+ ]
76
+ end
77
+
78
+ info << join_link
74
79
 
75
- [
76
- @endpoint,
77
- game_map,
78
- "#{numplayers}/#{maxplayers} players",
79
- "#{numspectators}/#{maxspectators} spectators"
80
- ].join(MSG_SNIPPET_DELIMITER)
80
+ info.join(MSG_SNIPPET_DELIMITER)
81
81
  end
82
82
 
83
83
  def is_empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qwtf_discord_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.25
4
+ version: 5.5.26
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-19 00:00:00.000000000 Z
11
+ date: 2021-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: discordrb