mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Implement logic for dynamic VanityURL changing from ArchiBoT
This commit is contained in:
@@ -875,16 +875,12 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal async Task<bool> HasValidApiKey() => !string.IsNullOrEmpty(await GetApiKey().ConfigureAwait(false));
|
||||
|
||||
internal async Task<bool> Init(ulong steamID, EUniverse universe, string webAPIUserNonce, string parentalPin, string vanityURL = null) {
|
||||
internal async Task<bool> Init(ulong steamID, EUniverse universe, string webAPIUserNonce, string parentalPin) {
|
||||
if ((steamID == 0) || (universe == EUniverse.Invalid) || string.IsNullOrEmpty(webAPIUserNonce) || string.IsNullOrEmpty(parentalPin)) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(steamID) + " || " + nameof(universe) + " || " + nameof(webAPIUserNonce) + " || " + nameof(parentalPin));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(vanityURL)) {
|
||||
VanityURL = vanityURL;
|
||||
}
|
||||
|
||||
string sessionID = Convert.ToBase64String(Encoding.UTF8.GetBytes(steamID.ToString()));
|
||||
|
||||
// Generate an AES session key
|
||||
@@ -1026,6 +1022,8 @@ namespace ArchiSteamFarm {
|
||||
SteamID = 0;
|
||||
}
|
||||
|
||||
internal void OnVanityURLChanged(string vanityURL = null) => VanityURL = string.IsNullOrEmpty(vanityURL) ? null : vanityURL;
|
||||
|
||||
internal async Task<(EResult Result, EPurchaseResultDetail? PurchaseResult)?> RedeemWalletKey(string key) {
|
||||
if (string.IsNullOrEmpty(key)) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(key));
|
||||
|
||||
Reference in New Issue
Block a user