fix bot
This commit is contained in:
@@ -25,7 +25,7 @@ public class DiscordBotServices
|
||||
|
||||
public ILogger<DiscordBotServices> Logger { get; init; }
|
||||
public MareMetrics Metrics { get; init; }
|
||||
public ConcurrentQueue<KeyValuePair<ulong, Action<DiscordBotServices>>> VerificationQueue { get; } = new();
|
||||
public ConcurrentQueue<KeyValuePair<ulong, Func<DiscordBotServices, Task>>> VerificationQueue { get; } = new();
|
||||
|
||||
public Task Start()
|
||||
{
|
||||
@@ -49,7 +49,7 @@ public class DiscordBotServices
|
||||
{
|
||||
try
|
||||
{
|
||||
queueitem.Value.Invoke(this);
|
||||
await queueitem.Value.Invoke(this).ConfigureAwait(false);
|
||||
Logger.LogInformation("Processed Verification for {key}", queueitem.Key);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -75,8 +75,8 @@ public partial class MareWizardModule
|
||||
|
||||
_logger.LogInformation("{method}:{userId}:{verificationcode}", nameof(ComponentRegisterVerify), Context.Interaction.User.Id, verificationCode);
|
||||
|
||||
_botServices.VerificationQueue.Enqueue(new KeyValuePair<ulong, Action<DiscordBotServices>>(Context.User.Id,
|
||||
async (service) => await HandleVerifyAsync(Context.User.Id, verificationCode, service).ConfigureAwait(false)));
|
||||
_botServices.VerificationQueue.Enqueue(new KeyValuePair<ulong, Func<DiscordBotServices, Task>>(Context.User.Id,
|
||||
(service) => HandleVerifyAsync(Context.User.Id, verificationCode, service)));
|
||||
EmbedBuilder eb = new();
|
||||
ComponentBuilder cb = new();
|
||||
eb.WithColor(Color.Purple);
|
||||
|
||||
@@ -70,8 +70,8 @@ public partial class MareWizardModule
|
||||
_logger.LogInformation("{method}:{userId}:{uid}:{verificationCode}", nameof(ComponentRelinkVerify), Context.Interaction.User.Id, uid, verificationCode);
|
||||
|
||||
|
||||
_botServices.VerificationQueue.Enqueue(new KeyValuePair<ulong, Action<DiscordBotServices>>(Context.User.Id,
|
||||
async (services) => await HandleVerifyRelinkAsync(Context.User.Id, verificationCode, services).ConfigureAwait(false)));
|
||||
_botServices.VerificationQueue.Enqueue(new KeyValuePair<ulong, Func<DiscordBotServices, Task>>(Context.User.Id,
|
||||
(services) => HandleVerifyRelinkAsync(Context.User.Id, verificationCode, services)));
|
||||
EmbedBuilder eb = new();
|
||||
ComponentBuilder cb = new();
|
||||
eb.WithColor(Color.Purple);
|
||||
|
||||
Reference in New Issue
Block a user