.whoplays no longer needs quotes for multiword games
This commit is contained in:
parent
6d9d8a8b40
commit
00e59dd34b
@ -947,11 +947,13 @@ namespace NadekoBot.Modules.Administration
|
|||||||
});
|
});
|
||||||
|
|
||||||
cgb.CreateCommand(Prefix + "whoplays")
|
cgb.CreateCommand(Prefix + "whoplays")
|
||||||
.Description("Shows a list of users who are playing the specified game")
|
.Description("Shows a list of users who are playing the specified game.")
|
||||||
.Parameter("game")
|
.Parameter("game", ParameterType.Unparsed)
|
||||||
.Do(async e =>
|
.Do(async e =>
|
||||||
{
|
{
|
||||||
var game = e.GetArg("game").Trim().ToUpperInvariant();
|
var game = e.GetArg("game")?.Trim().ToUpperInvariant();
|
||||||
|
if (string.IsNullOrWhiteSpace(game))
|
||||||
|
return;
|
||||||
var en = e.Server.Users
|
var en = e.Server.Users
|
||||||
.Where(u => u.CurrentGame?.ToUpperInvariant() == game)
|
.Where(u => u.CurrentGame?.ToUpperInvariant() == game)
|
||||||
.Select(u => $"{u.Name}");
|
.Select(u => $"{u.Name}");
|
||||||
|
Loading…
Reference in New Issue
Block a user