1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2025-07-01 08:47:36 +00:00

"Commands" command created and tested

This commit is contained in:
glucaci
2016-12-20 11:19:26 +01:00
parent b7791ab26a
commit 36a4888789
2 changed files with 27 additions and 1 deletions

View File

@ -11,7 +11,22 @@ namespace LibMpc
public static class Reflection
{
// TODO: config
// TODO: commands
/// <summary>
/// Shows which commands the current user has access to.
/// </summary>
public class Commands : IMpcCommand<IEnumerable<string>>
{
public string Value => "commands";
public IEnumerable<string> FormatResponse(IList<KeyValuePair<string, string>> response)
{
var result = response.Where(item => item.Key.Equals("command")).Select(item => item.Value);
return result;
}
}
// TODO: notcommands
public class TagTypes : IMpcCommand<IEnumerable<string>>