.whoplays command added
This commit is contained in:
parent
c51d41d40f
commit
b7c8bf504c
@ -946,6 +946,25 @@ namespace NadekoBot.Modules.Administration
|
||||
await e.Channel.SendMessage(":ok:");
|
||||
});
|
||||
|
||||
cgb.CreateCommand(Prefix + "whoplays")
|
||||
.Description("Shows a list of users who are playing the specified game")
|
||||
.Parameter("game")
|
||||
.Do(async e =>
|
||||
{
|
||||
var game = e.GetArg("game").Trim().ToUpperInvariant();
|
||||
var en = e.Server.Users
|
||||
.Where(u => u.CurrentGame?.ToUpperInvariant() == game)
|
||||
.Select(u => $"{u.Name}");
|
||||
|
||||
var arr = en as string[] ?? en.ToArray();
|
||||
|
||||
if (arr.Length == 0)
|
||||
await e.Channel.SendMessage("Nobody. (not 100% sure)");
|
||||
else
|
||||
await e.Channel.SendMessage("• " + string.Join("\n• ", arr));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,8 @@ namespace NadekoBot.Modules.Music.Classes
|
||||
Console.WriteLine($"Exception in PlaySong: {ex}");
|
||||
}
|
||||
OnCompleted(this, curSong);
|
||||
curSong = CurrentSong; //to check if its null now
|
||||
if (curSong != null)
|
||||
if (RepeatSong)
|
||||
playlist.Insert(0, curSong);
|
||||
else if (RepeatPlaylist)
|
||||
|
Loading…
Reference in New Issue
Block a user