qwtf_discord_bot 5.4.12 → 5.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/qwtf_discord_bot/qwtf_discord_bot_pug.rb +36 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 256bc5dd2a321a2e9495764c946142a36bdc4cec6f4871a70c3d8b2b6e0d1357
|
4
|
+
data.tar.gz: 16d3964888b04bdb1580ef62b1541375876dfdd2a24847ff60bc2927871f8ab3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c153a53da144bd6af78ea5013dd080d1f7da909ec532da2fa3787aa872ef03d778aaf30857d63ed204934cdfe5be3ff23aab166f6a747291ccb67f94ea23f10e
|
7
|
+
data.tar.gz: 986cc092056e071b8dcd877a4869d98911e9366253842f48e75df0f333445bfab71da2a6bab20e8242127a38a4fa187c930279497a3b632bc81ad63327972b65
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.4.
|
1
|
+
5.4.13
|
@@ -288,26 +288,47 @@ class QwtfDiscordBotPug # :nodoc:
|
|
288
288
|
)
|
289
289
|
end
|
290
290
|
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
291
|
+
if args.empty?
|
292
|
+
unless pug.joined?(user_id)
|
293
|
+
return send_embedded_message(
|
294
|
+
description: "You aren't in this PUG",
|
295
|
+
channel: e.channel
|
296
|
+
)
|
297
|
+
end
|
297
298
|
|
298
|
-
|
299
|
-
|
300
|
-
|
299
|
+
if pug.team(0).include?(user_id)
|
300
|
+
return send_embedded_message(
|
301
|
+
description: "You aren't in a team",
|
302
|
+
channel: e.channel
|
303
|
+
)
|
304
|
+
end
|
305
|
+
|
306
|
+
pug.join_team(team_no: 0, player_id: user_id)
|
307
|
+
|
308
|
+
send_embedded_message(
|
309
|
+
description: "#{e.display_name} leaves team",
|
301
310
|
channel: e.channel
|
302
311
|
)
|
303
|
-
|
312
|
+
else
|
313
|
+
args.each do |mention|
|
314
|
+
unless mention.match(/<@!\d+>/)
|
315
|
+
send_embedded_message(
|
316
|
+
description: "#{arg} isn't a valid mention",
|
317
|
+
channel: e.channel
|
318
|
+
)
|
319
|
+
next
|
320
|
+
end
|
304
321
|
|
305
|
-
|
322
|
+
user_id = mention_to_user_id(mention)
|
323
|
+
display_name = e.display_name_for(user_id) || arg
|
324
|
+
pug.join_team(team_no: 0, player_id: user_id)
|
306
325
|
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
326
|
+
send_embedded_message(
|
327
|
+
description: "#{display_name} leaves team",
|
328
|
+
channel: e.channel
|
329
|
+
)
|
330
|
+
end
|
331
|
+
end
|
311
332
|
end
|
312
333
|
end
|
313
334
|
|
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.4.
|
4
|
+
version: 5.4.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sheldon Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: discordrb
|