diff --git a/MareSynchronosServer/MareSynchronosServices/Discord/DiscordBotServices.cs b/MareSynchronosServer/MareSynchronosServices/Discord/DiscordBotServices.cs index 21bbe10..eab4abf 100644 --- a/MareSynchronosServer/MareSynchronosServices/Discord/DiscordBotServices.cs +++ b/MareSynchronosServer/MareSynchronosServices/Discord/DiscordBotServices.cs @@ -25,7 +25,7 @@ public class DiscordBotServices public ILogger Logger { get; init; } public MareMetrics Metrics { get; init; } - public ConcurrentQueue>> VerificationQueue { get; } = new(); + public ConcurrentQueue>> 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) diff --git a/MareSynchronosServer/MareSynchronosServices/Discord/MareWizardModule.Register.cs b/MareSynchronosServer/MareSynchronosServices/Discord/MareWizardModule.Register.cs index 678d462..e505e4a 100644 --- a/MareSynchronosServer/MareSynchronosServices/Discord/MareWizardModule.Register.cs +++ b/MareSynchronosServer/MareSynchronosServices/Discord/MareWizardModule.Register.cs @@ -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>(Context.User.Id, - async (service) => await HandleVerifyAsync(Context.User.Id, verificationCode, service).ConfigureAwait(false))); + _botServices.VerificationQueue.Enqueue(new KeyValuePair>(Context.User.Id, + (service) => HandleVerifyAsync(Context.User.Id, verificationCode, service))); EmbedBuilder eb = new(); ComponentBuilder cb = new(); eb.WithColor(Color.Purple); diff --git a/MareSynchronosServer/MareSynchronosServices/Discord/MareWizardModule.Relink.cs b/MareSynchronosServer/MareSynchronosServices/Discord/MareWizardModule.Relink.cs index 4025471..8acf7ae 100644 --- a/MareSynchronosServer/MareSynchronosServices/Discord/MareWizardModule.Relink.cs +++ b/MareSynchronosServer/MareSynchronosServices/Discord/MareWizardModule.Relink.cs @@ -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>(Context.User.Id, - async (services) => await HandleVerifyRelinkAsync(Context.User.Id, verificationCode, services).ConfigureAwait(false))); + _botServices.VerificationQueue.Enqueue(new KeyValuePair>(Context.User.Id, + (services) => HandleVerifyRelinkAsync(Context.User.Id, verificationCode, services))); EmbedBuilder eb = new(); ComponentBuilder cb = new(); eb.WithColor(Color.Purple);