mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 00:50:15 +00:00
Misc
This commit is contained in:
@@ -57,6 +57,10 @@ namespace ArchiSteamFarm.IPC.Controllers.Api {
|
||||
|
||||
if (!string.IsNullOrEmpty(ASF.GlobalConfig.CommandPrefix) && command.StartsWith(ASF.GlobalConfig.CommandPrefix, StringComparison.Ordinal)) {
|
||||
command = command.Substring(ASF.GlobalConfig.CommandPrefix.Length);
|
||||
|
||||
if (string.IsNullOrEmpty(command)) {
|
||||
return BadRequest(new GenericResponse<string>(false, string.Format(Strings.ErrorIsEmpty, nameof(command))));
|
||||
}
|
||||
}
|
||||
|
||||
string response = await targetBot.Commands.Response(ASF.GlobalConfig.SteamOwnerID, command).ConfigureAwait(false);
|
||||
|
||||
@@ -265,6 +265,14 @@ namespace ArchiSteamFarm.NLog {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ASF.GlobalConfig.CommandPrefix) && command.StartsWith(ASF.GlobalConfig.CommandPrefix, StringComparison.Ordinal)) {
|
||||
command = command.Substring(ASF.GlobalConfig.CommandPrefix.Length);
|
||||
|
||||
if (string.IsNullOrEmpty(command)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Bot targetBot = Bot.Bots.OrderBy(bot => bot.Key).Select(bot => bot.Value).FirstOrDefault();
|
||||
|
||||
if (targetBot == null) {
|
||||
|
||||
Reference in New Issue
Block a user