This commit is contained in:
JustArchi
2019-01-12 17:48:56 +01:00
parent 1bbdce06c4
commit 7aff2ecbb1
2 changed files with 5 additions and 5 deletions

View File

@@ -55,11 +55,11 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
return BadRequest(new GenericResponse<string>(false, Strings.ErrorNoBotsDefined));
}
if (!string.IsNullOrEmpty(Program.GlobalConfig.CommandPrefix) && !command.StartsWith(Program.GlobalConfig.CommandPrefix, StringComparison.Ordinal)) {
command = Program.GlobalConfig.CommandPrefix + command;
if (!string.IsNullOrEmpty(Program.GlobalConfig.CommandPrefix) && command.StartsWith(Program.GlobalConfig.CommandPrefix, StringComparison.Ordinal)) {
command = command.Substring(Program.GlobalConfig.CommandPrefix.Length);
}
string response = await targetBot.Commands.Response(Program.GlobalConfig.SteamOwnerID, command).ConfigureAwait(false);
string response = await targetBot.Commands.Response(Program.GlobalConfig.SteamOwnerID, command, false).ConfigureAwait(false);
return Ok(new GenericResponse<string>(response));
}