From 2def27dde5f7c7d00765260e90cf1d3267ce696f Mon Sep 17 00:00:00 2001 From: Octol1ttle Date: Sat, 30 Sep 2023 20:29:21 +0500 Subject: [PATCH] Resolve failing checks --- src/Services/GuildDataService.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Services/GuildDataService.cs b/src/Services/GuildDataService.cs index 95af725..f5c7faa 100644 --- a/src/Services/GuildDataService.cs +++ b/src/Services/GuildDataService.cs @@ -4,7 +4,6 @@ using System.Text.Json.Nodes; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Octobot.Data; -using Remora.Discord.API.Abstractions.Rest; using Remora.Rest.Core; namespace Octobot.Services; @@ -15,14 +14,12 @@ namespace Octobot.Services; public sealed class GuildDataService : IHostedService { private readonly ConcurrentDictionary _datas = new(); - private readonly IDiscordRestGuildAPI _guildApi; private readonly ILogger _logger; // https://github.com/dotnet/aspnetcore/issues/39139 public GuildDataService( - IHostApplicationLifetime lifetime, IDiscordRestGuildAPI guildApi, ILogger logger) + IHostApplicationLifetime lifetime, ILogger logger) { - _guildApi = guildApi; _logger = logger; lifetime.ApplicationStopping.Register(ApplicationStopping); } @@ -141,11 +138,6 @@ public sealed class GuildDataService : IHostedService return (await GetData(guildId, ct)).Settings; } - public async Task GetMemberData(Snowflake guildId, Snowflake userId, CancellationToken ct = default) - { - return (await GetData(guildId, ct)).GetOrCreateMemberData(userId); - } - public ICollection GetGuildIds() { return _datas.Keys;