mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
* Start work on #2500 * Update Bot.cs * Misc refactor * Update Bot.cs * Add fallback for older plugins * Misc * Apply feedback
This commit is contained in:
committed by
GitHub
parent
ab6e0a1e1b
commit
4258fed873
@@ -54,12 +54,6 @@ public sealed class CommandController : ArchiController {
|
||||
return BadRequest(new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsEmpty, nameof(request.Command))));
|
||||
}
|
||||
|
||||
ulong steamOwnerID = ASF.GlobalConfig?.SteamOwnerID ?? GlobalConfig.DefaultSteamOwnerID;
|
||||
|
||||
if (steamOwnerID == 0) {
|
||||
return BadRequest(new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsInvalid, nameof(ASF.GlobalConfig.SteamOwnerID))));
|
||||
}
|
||||
|
||||
Bot? targetBot = Bot.Bots?.OrderBy(static bot => bot.Key, Bot.BotsComparer).Select(static bot => bot.Value).FirstOrDefault();
|
||||
|
||||
if (targetBot == null) {
|
||||
@@ -80,7 +74,7 @@ public sealed class CommandController : ArchiController {
|
||||
command = command[commandPrefix.Length..];
|
||||
}
|
||||
|
||||
string? response = await targetBot.Commands.Response(steamOwnerID, command).ConfigureAwait(false);
|
||||
string? response = await targetBot.Commands.Response(EAccess.Owner, command).ConfigureAwait(false);
|
||||
|
||||
return Ok(new GenericResponse<string>(response));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user