mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Get SteamMasterChatGroupID automatically
Alexa this is so good, play a-TTTempo - TOHO FULL SWING 2 - THMNK you.
This commit is contained in:
@@ -114,9 +114,6 @@ namespace ArchiSteamFarm {
|
||||
[JsonProperty]
|
||||
internal string SteamLogin { get; set; }
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal ulong SteamMasterChatGroupID { get; private set; }
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal ulong SteamMasterClanID { get; private set; }
|
||||
|
||||
@@ -128,19 +125,6 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private bool ShouldSerializeSensitiveDetails = true;
|
||||
|
||||
[JsonProperty(PropertyName = SharedInfo.UlongCompatibilityStringPrefix + nameof(SteamMasterChatGroupID), Required = Required.DisallowNull)]
|
||||
private string SSteamMasterChatGroupID {
|
||||
get => SteamMasterChatGroupID.ToString();
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value) || !ulong.TryParse(value, out ulong result)) {
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(SSteamMasterChatGroupID)));
|
||||
return;
|
||||
}
|
||||
|
||||
SteamMasterChatGroupID = result;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty(PropertyName = SharedInfo.UlongCompatibilityStringPrefix + nameof(SteamMasterClanID), Required = Required.DisallowNull)]
|
||||
private string SSteamMasterClanID {
|
||||
get => SteamMasterClanID.ToString();
|
||||
@@ -228,6 +212,11 @@ namespace ArchiSteamFarm {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((botConfig.SteamMasterClanID != 0) && !new SteamID(botConfig.SteamMasterClanID).IsClanAccount) {
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(botConfig.SteamMasterClanID), botConfig.SteamMasterClanID));
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach (EPermission permission in botConfig.SteamUserPermissions.Values) {
|
||||
if (!Enum.IsDefined(typeof(EPermission), permission)) {
|
||||
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(botConfig.SteamUserPermissions), permission));
|
||||
|
||||
Reference in New Issue
Block a user