add more logging to mare wizard module
This commit is contained in:
@@ -14,6 +14,8 @@ public partial class MareWizardModule
|
||||
{
|
||||
if (!(await ValidateInteraction().ConfigureAwait(false))) return;
|
||||
|
||||
_logger.LogInformation("{method}:{userId}", nameof(ComponentRelink), Context.Interaction.User.Id);
|
||||
|
||||
EmbedBuilder eb = new();
|
||||
eb.WithTitle("Relink");
|
||||
eb.WithColor(Color.Blue);
|
||||
@@ -32,6 +34,8 @@ public partial class MareWizardModule
|
||||
{
|
||||
if (!(await ValidateInteraction().ConfigureAwait(false))) return;
|
||||
|
||||
_logger.LogInformation("{method}:{userId}", nameof(ComponentRelinkStart), Context.Interaction.User.Id);
|
||||
|
||||
using var db = GetDbContext();
|
||||
db.LodeStoneAuth.RemoveRange(db.LodeStoneAuth.Where(u => u.DiscordId == Context.User.Id));
|
||||
_botServices.DiscordVerifiedUsers.TryRemove(Context.User.Id, out _);
|
||||
@@ -46,6 +50,8 @@ public partial class MareWizardModule
|
||||
{
|
||||
if (!(await ValidateInteraction().ConfigureAwait(false))) return;
|
||||
|
||||
_logger.LogInformation("{method}:{userId}:{url}", nameof(ModalRelink), Context.Interaction.User.Id, lodestoneModal.LodestoneUrl);
|
||||
|
||||
EmbedBuilder eb = new();
|
||||
eb.WithColor(Color.Purple);
|
||||
var result = await HandleRelinkModalAsync(eb, lodestoneModal).ConfigureAwait(false);
|
||||
@@ -61,6 +67,9 @@ public partial class MareWizardModule
|
||||
{
|
||||
if (!(await ValidateInteraction().ConfigureAwait(false))) return;
|
||||
|
||||
_logger.LogInformation("{method}:{userId}:{uid}:{verificationCode}", nameof(ComponentRelinkVerify), Context.Interaction.User.Id, uid, verificationCode);
|
||||
|
||||
|
||||
_botServices.VerificationQueue.Enqueue(new KeyValuePair<ulong, Action<IServiceProvider>>(Context.User.Id,
|
||||
async (_) => await HandleVerifyRelinkAsync(Context.User.Id, verificationCode).ConfigureAwait(false)));
|
||||
EmbedBuilder eb = new();
|
||||
@@ -80,6 +89,8 @@ public partial class MareWizardModule
|
||||
{
|
||||
if (!(await ValidateInteraction().ConfigureAwait(false))) return;
|
||||
|
||||
_logger.LogInformation("{method}:{userId}:{uid}:{verificationCode}", nameof(ComponentRelinkVerifyCheck), Context.Interaction.User.Id, uid, verificationCode);
|
||||
|
||||
EmbedBuilder eb = new();
|
||||
ComponentBuilder cb = new();
|
||||
bool stillEnqueued = _botServices.VerificationQueue.Any(k => k.Key == Context.User.Id);
|
||||
|
||||
Reference in New Issue
Block a user