mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Implement plugin system (#1020)
* Implement basic plugin system * The dawn of new era * Add plugins warning * Move more members to PublicAPI * Open commands for the plugins * Add IBotHackNewChat * Run plugin events in parallel * Use properties in IPlugin * Hook our custom plugin into CI to ensure it compiles * Fix dotnet brain damage * Add IBotsComparer * Add code documentation * Add IBotTradeOffer * Add IBotTradeOffer example * Add IBotTradeOfferResults * Final bulletproofing * Final renaming
This commit is contained in:
committed by
GitHub
parent
62a770479e
commit
0f2a816b92
@@ -101,7 +101,7 @@ namespace ArchiSteamFarm {
|
||||
};
|
||||
|
||||
// Listing is free to deny our announce request, hence we don't retry
|
||||
if (await Program.WebBrowser.UrlPost(request, data, maxTries: 1).ConfigureAwait(false) != null) {
|
||||
if (await Bot.ArchiWebHandler.WebBrowser.UrlPost(request, data, maxTries: 1).ConfigureAwait(false) != null) {
|
||||
LastHeartBeat = DateTime.UtcNow;
|
||||
}
|
||||
} finally {
|
||||
@@ -176,16 +176,16 @@ namespace ArchiSteamFarm {
|
||||
};
|
||||
|
||||
// Listing is free to deny our announce request, hence we don't retry
|
||||
ShouldSendHeartBeats = await Program.WebBrowser.UrlPost(request, data, maxTries: 1).ConfigureAwait(false) != null;
|
||||
ShouldSendHeartBeats = await Bot.ArchiWebHandler.WebBrowser.UrlPost(request, data, maxTries: 1).ConfigureAwait(false) != null;
|
||||
} finally {
|
||||
RequestsSemaphore.Release();
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task<HashSet<ListedUser>> GetListedUsers() {
|
||||
private async Task<HashSet<ListedUser>> GetListedUsers() {
|
||||
const string request = URL + "/Api/Bots";
|
||||
|
||||
WebBrowser.ObjectResponse<HashSet<ListedUser>> objectResponse = await Program.WebBrowser.UrlGetToJsonObject<HashSet<ListedUser>>(request).ConfigureAwait(false);
|
||||
WebBrowser.ObjectResponse<HashSet<ListedUser>> objectResponse = await Bot.ArchiWebHandler.WebBrowser.UrlGetToJsonObject<HashSet<ListedUser>>(request).ConfigureAwait(false);
|
||||
|
||||
return objectResponse?.Content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user