mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 17:07:22 +01:00
fix bot
This commit is contained in:
parent
2fe312ad67
commit
33afe8da2c
3 changed files with 6 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue