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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea5f5046690139982d6f1d8324c4b4d312d6d21f5c5d6f3734211038454db8b7
4
- data.tar.gz: 9ce6466357c99b25415f55b0eed27edd3acd8bc4e741045bfcb3cc85cbb34509
3
+ metadata.gz: 2764268ae2786e3217f973d14b910bbed79dd4b1d4b822ebaee31b4f555c9945
4
+ data.tar.gz: ec2f3fd80b0eaaa222ca9cac071763ef3220190991f94e37a112025002b76cec
5
5
  SHA512:
6
- metadata.gz: 19428a1ac12bb6da56fbebaf8e47420f49514aa579b208c8063832d41d5a8948a3dc112358a8e4c8f5ab2fa4693c6521cc89ecddf4087a02e60bcc8862c47fc9
7
- data.tar.gz: 22d259fa928093d9eec63eb1896b1e9ec7edf32e4ef8fe5e198d3b4a882c670641e9690755ed15fea49fcee9328b2999406d8a4cc9f7d8fb719c7c34ced5bfcd
6
+ metadata.gz: 7d86a1207ec73b9225c0a72d530000a6e7ce3297e490bbb914dd45f181be7b1a214c67242b35274545c1f92c4d11911c42e5b6434fc5ecc1dddae33303bfff72
7
+ data.tar.gz: b654a7a3c136c4847dd9aefc0f4e7e695b7f7dc4a8a8ad521535096d10385c17397f2324bb0a65393da99207934f719523b00a9a1754dd76a368d5bd0001ce75
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.1.3
1
+ 5.1.4
@@ -11,8 +11,8 @@ class EventDecorator
11
11
  @event.channel.id
12
12
  end
13
13
 
14
- def username
15
- user.username
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 usernames_for(user_ids)
31
- find_users(user_ids).map(&:username)
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.username} creates a PUG",
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.username} joins the PUG",
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.username} joins the PUG",
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.usernames_for(pug.joined_players).join(', ')} joined",
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.username} leaves the PUG | #{pug.player_slots} remain"
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.3
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-24 00:00:00.000000000 Z
11
+ date: 2020-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: discordrb