rebuild discord bot to better user interactions

This commit is contained in:
rootdarkarchon
2023-09-17 00:05:57 +02:00
parent 56b27e5ee8
commit 7e90187822
13 changed files with 1409 additions and 7 deletions

View File

@@ -1,4 +1,6 @@
using System.Collections.Concurrent;
using Discord.Rest;
using Discord.WebSocket;
using MareSynchronosShared.Metrics;
namespace MareSynchronosServices.Discord;
@@ -8,10 +10,13 @@ public class DiscordBotServices
public readonly string[] LodestoneServers = new[] { "eu", "na", "jp", "fr", "de" };
public ConcurrentDictionary<ulong, string> DiscordLodestoneMapping = new();
public ConcurrentDictionary<ulong, string> DiscordRelinkLodestoneMapping = new();
public ConcurrentDictionary<ulong, bool> DiscordVerifiedUsers { get; } = new();
public ConcurrentDictionary<ulong, DateTime> LastVanityChange = new();
public ConcurrentDictionary<string, DateTime> LastVanityGidChange = new();
public ConcurrentDictionary<ulong, ulong> ValidInteractions { get; } = new();
public List<RestRole> VanityRoles { get; set; } = new();
private readonly IServiceProvider _serviceProvider;
private CancellationTokenSource? verificationTaskCts;
private CancellationTokenSource verificationTaskCts;
public DiscordBotServices(IServiceProvider serviceProvider, ILogger<DiscordBotServices> logger, MareMetrics metrics)
{