add mare profiles

This commit is contained in:
rootdarkarchon
2023-03-19 18:57:55 +01:00
parent 2cfd005fed
commit 7b0ac34623
24 changed files with 2313 additions and 379 deletions

View File

@@ -5,16 +5,12 @@ namespace MareSynchronosServices.Discord;
public class DiscordBotServices
{
public ConcurrentQueue<KeyValuePair<ulong, Action<IServiceProvider>>> VerificationQueue { get; } = new();
public ConcurrentDictionary<ulong, DateTime> LastVanityChange = new();
public ConcurrentDictionary<string, DateTime> LastVanityGidChange = new();
public readonly string[] LodestoneServers = new[] { "eu", "na", "jp", "fr", "de" };
public ConcurrentDictionary<ulong, string> DiscordLodestoneMapping = new();
public ConcurrentDictionary<ulong, string> DiscordRelinkLodestoneMapping = new();
public readonly string[] LodestoneServers = new[] { "eu", "na", "jp", "fr", "de" };
public ConcurrentDictionary<ulong, DateTime> LastVanityChange = new();
public ConcurrentDictionary<string, DateTime> LastVanityGidChange = new();
private readonly IServiceProvider _serviceProvider;
public ILogger<DiscordBotServices> Logger { get; init; }
public MareMetrics Metrics { get; init; }
private CancellationTokenSource? verificationTaskCts;
public DiscordBotServices(IServiceProvider serviceProvider, ILogger<DiscordBotServices> logger, MareMetrics metrics)
@@ -24,6 +20,10 @@ public class DiscordBotServices
Metrics = metrics;
}
public ILogger<DiscordBotServices> Logger { get; init; }
public MareMetrics Metrics { get; init; }
public ConcurrentQueue<KeyValuePair<ulong, Action<IServiceProvider>>> VerificationQueue { get; } = new();
public Task Start()
{
_ = ProcessVerificationQueue();
@@ -58,4 +58,4 @@ public class DiscordBotServices
await Task.Delay(TimeSpan.FromSeconds(2), verificationTaskCts.Token).ConfigureAwait(false);
}
}
}
}