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
@@ -209,7 +209,7 @@ public sealed class ArchiLogger {
|
||||
|
||||
internal void LogInvite(SteamID steamID, bool? handled = null, [CallerMemberName] string? previousMethodName = null) {
|
||||
if ((steamID == null) || (steamID.AccountType == EAccountType.Invalid)) {
|
||||
throw new ArgumentNullException(nameof(steamID));
|
||||
throw new ArgumentOutOfRangeException(nameof(steamID));
|
||||
}
|
||||
|
||||
ulong steamID64 = steamID;
|
||||
|
||||
@@ -240,12 +240,6 @@ internal static class Logging {
|
||||
}
|
||||
|
||||
internal static void StartInteractiveConsole() {
|
||||
if ((ASF.GlobalConfig == null) || (ASF.GlobalConfig.SteamOwnerID == 0)) {
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.InteractiveConsoleNotAvailable, nameof(ASF.GlobalConfig.SteamOwnerID)));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Utilities.InBackground(HandleConsoleInteractively, true);
|
||||
ASF.ArchiLogger.LogGenericInfo(Strings.InteractiveConsoleEnabled);
|
||||
}
|
||||
@@ -368,10 +362,8 @@ internal static class Logging {
|
||||
|
||||
Console.WriteLine($@"<> {Strings.Executing}");
|
||||
|
||||
ulong steamOwnerID = ASF.GlobalConfig?.SteamOwnerID ?? GlobalConfig.DefaultSteamOwnerID;
|
||||
|
||||
// ReSharper disable once RedundantSuppressNullableWarningExpression - required for .NET Framework
|
||||
string? response = await targetBot.Commands.Response(steamOwnerID, command!).ConfigureAwait(false);
|
||||
string? response = await targetBot.Commands.Response(EAccess.Owner, command!).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrEmpty(response)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(response));
|
||||
|
||||
Reference in New Issue
Block a user