* Replacement mechanism reworked

* Services can now register their own replacements
    * Possible bugs and/or backwards-incompatible behavior
This commit is contained in:
Kwoth
2024-04-01 01:18:26 +00:00
parent 043ad98473
commit 2d3ff83c7c
37 changed files with 892 additions and 415 deletions

View File

@@ -6,7 +6,7 @@ using System.Text.Json;
namespace NadekoBot.Modules.Searches;
// todo fix stock/crypto
// todo fix stock
public sealed class DefaultStockDataService : IStockDataService, INService
{
private readonly IHttpClientFactory _httpClientFactory;
@@ -83,7 +83,6 @@ public sealed class DefaultStockDataService : IStockDataService, INService
PrepareHeaderForMatch = args => args.Header.Humanize(LetterCasing.Title)
};
// todo this needs testing
public async Task<IReadOnlyCollection<CandleData>> GetCandleDataAsync(string query)
{
using var http = _httpClientFactory.CreateClient();