qwtf_discord_bot 5.1.3 → 5.1.4
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/event_decorator.rb +4 -4
- data/lib/qwtf_discord_bot/qwtf_discord_bot_pug.rb +5 -5
- 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: 2764268ae2786e3217f973d14b910bbed79dd4b1d4b822ebaee31b4f555c9945
|
4
|
+
data.tar.gz: ec2f3fd80b0eaaa222ca9cac071763ef3220190991f94e37a112025002b76cec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d86a1207ec73b9225c0a72d530000a6e7ce3297e490bbb914dd45f181be7b1a214c67242b35274545c1f92c4d11911c42e5b6434fc5ecc1dddae33303bfff72
|
7
|
+
data.tar.gz: b654a7a3c136c4847dd9aefc0f4e7e695b7f7dc4a8a8ad521535096d10385c17397f2324bb0a65393da99207934f719523b00a9a1754dd76a368d5bd0001ce75
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.1.
|
1
|
+
5.1.4
|
data/lib/event_decorator.rb
CHANGED
@@ -11,8 +11,8 @@ class EventDecorator
|
|
11
11
|
@event.channel.id
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
15
|
-
user.
|
14
|
+
def display_name
|
15
|
+
user.display_name
|
16
16
|
end
|
17
17
|
|
18
18
|
def user_id
|
@@ -27,8 +27,8 @@ class EventDecorator
|
|
27
27
|
find_users(user_ids).map(&:mention)
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
31
|
-
find_users(user_ids).map(&:
|
30
|
+
def display_names_for(user_ids)
|
31
|
+
find_users(user_ids).map(&:display_name)
|
32
32
|
end
|
33
33
|
|
34
34
|
private
|
@@ -26,20 +26,20 @@ class QwtfDiscordBotPug # :nodoc:
|
|
26
26
|
|
27
27
|
message = if pug.joined_player_count == 1
|
28
28
|
[
|
29
|
-
"#{e.
|
29
|
+
"#{e.display_name} creates a PUG",
|
30
30
|
pug.player_slots,
|
31
31
|
pug.notify_roles
|
32
32
|
].join(' | ')
|
33
33
|
elsif pug.slots_left.between?(1,3)
|
34
34
|
[
|
35
|
-
"#{e.
|
35
|
+
"#{e.display_name} joins the PUG",
|
36
36
|
pug.player_slots,
|
37
37
|
"#{pug.slots_left} more",
|
38
38
|
pug.notify_roles
|
39
39
|
].join(' | ')
|
40
40
|
else
|
41
41
|
[
|
42
|
-
"#{e.
|
42
|
+
"#{e.display_name} joins the PUG",
|
43
43
|
pug.player_slots
|
44
44
|
].join(' | ')
|
45
45
|
end
|
@@ -62,7 +62,7 @@ class QwtfDiscordBotPug # :nodoc:
|
|
62
62
|
set_pug(event) do |e, pug|
|
63
63
|
message = if pug.active?
|
64
64
|
[
|
65
|
-
"#{e.
|
65
|
+
"#{e.display_names_for(pug.joined_players).join(', ')} joined",
|
66
66
|
pug.player_slots
|
67
67
|
].join(' | ')
|
68
68
|
else
|
@@ -107,7 +107,7 @@ class QwtfDiscordBotPug # :nodoc:
|
|
107
107
|
send_and_log_message(message, e.channel)
|
108
108
|
else
|
109
109
|
pug.leave(e.user_id)
|
110
|
-
message = "#{e.
|
110
|
+
message = "#{e.display_name} leaves the PUG | #{pug.player_slots} remain"
|
111
111
|
send_and_log_message(message, e.channel)
|
112
112
|
|
113
113
|
if pug.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.1.
|
4
|
+
version: 5.1.4
|
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-08-
|
11
|
+
date: 2020-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: discordrb
|