qwtf_discord_bot 5.1.5 → 5.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0adf9bb170277ec37dddc27d86049f6d678ddbb3b69530b114a177f11719d21
4
- data.tar.gz: ff6c28db3deb0fad59b2ca45d4d53b3c45c622848cc15d6234d14b245c865413
3
+ metadata.gz: be9d7e86ba5a7b1a38b2ad8f12d34295a3882e871d535f01c1d8fb1ada700129
4
+ data.tar.gz: 1fad670f56fe547f42b5f6b4a14e0769a8195080125536c64b480d29f6bf4f48
5
5
  SHA512:
6
- metadata.gz: 5dfb62990d27a5f250ea4ddbbe5f62583618e947c2c26d8df85308e2b99bb204a35a2b25347080a2352d4d1a7508e45e690fd7a636cd7e7baf1fc2305d8c9a60
7
- data.tar.gz: 52590b32e2c4727c7ccd9b526bdc9f8abccb46b8d4e815d78cd7eb3cfd7dea669e57890b171dfdeb41c5a9de092d38147ae0b3469a97bb1450f96e713fe9b27a
6
+ metadata.gz: 8e6e67d9588c6806545133f3d37c473445b594c515d9621fdd2c6b95bad20e21af356756c949cff72445533611a2205b67989f8b58ae6b61da40a2dac20a7454
7
+ data.tar.gz: c7a8dcbeadf3074650526f3c8849db414dd6690699412182e9970fbdc893f2fb13be9f1997487af5329b785d548d7e4e93f9175d31f24ed7092e2b27ab531e0b
data/README.md CHANGED
@@ -89,8 +89,9 @@ This responds to discord messages:
89
89
  - `!join`
90
90
  - `!leave`
91
91
  - `!status`
92
+ - `!kick <@player>`
92
93
  - `!maxplayers <no_of_players>`
93
- - `!notify <roles>`
94
+ - `!notify <@role @role2>`
94
95
  - `!end`
95
96
 
96
97
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.1.5
1
+ 5.1.6
@@ -31,6 +31,10 @@ class EventDecorator
31
31
  find_users(user_ids).map(&:display_name)
32
32
  end
33
33
 
34
+ def display_name_for(user_id)
35
+ find_user(user_id).display_name
36
+ end
37
+
34
38
  private
35
39
 
36
40
  def find_users(user_ids)
@@ -127,13 +127,14 @@ class QwtfDiscordBotPug # :nodoc:
127
127
 
128
128
  mention = args[0]
129
129
  user_id = mention[3..-2].to_i
130
+ display_name = e.display_name_for(user_id)
130
131
 
131
132
  if !pug.joined_players.include?(user_id)
132
- message = "#{mention} isn't in the PUG"
133
+ message = "#{display_name} isn't in the PUG"
133
134
  send_and_log_message(message, e.channel)
134
135
  else
135
136
  pug.leave(user_id)
136
- message = "#{e.display_name} is kicked from the PUG | #{pug.player_slots} remain"
137
+ message = "#{display_name} is kicked from the PUG | #{pug.player_slots} remain"
137
138
  send_and_log_message(message, e.channel)
138
139
 
139
140
  if pug.empty?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qwtf_discord_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.5
4
+ version: 5.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sheldon Johnson