!api without <Bots> result in current bot instance now

Same like every other command, !api ASF exists for older behaviour
This commit is contained in:
JustArchi
2017-03-15 14:09:02 +01:00
parent 4543656109
commit 0dbf892a84

View File

@@ -2047,9 +2047,9 @@ namespace ArchiSteamFarm {
return responses.Count > 0 ? string.Join("", responses) : null;
}
private static string ResponseAPI(ulong steamID) {
if (steamID != 0) {
return IsOwner(steamID) ? FormatStaticResponse(GetAPIStatus(Bots)) : null;
private string ResponseAPI(ulong steamID) {
if (steamID == 0) {
return IsMaster(steamID) ? GetAPIStatus(Bots.Where(kv => kv.Value == this).ToDictionary(kv => kv.Key, kv => kv.Value)) : null;
}
ASF.ArchiLogger.LogNullError(nameof(steamID));