give registered role after modifying interaction

This commit is contained in:
Stanley Dimant
2025-01-03 13:19:26 +01:00
parent c73a810152
commit f047435ad9
2 changed files with 8 additions and 3 deletions

View File

@@ -104,6 +104,7 @@ public partial class MareWizardModule
ComponentBuilder cb = new();
bool stillEnqueued = _botServices.VerificationQueue.Any(k => k.Key == Context.User.Id);
bool verificationRan = _botServices.DiscordVerifiedUsers.TryGetValue(Context.User.Id, out bool verified);
bool registerSuccess = false;
if (!verificationRan)
{
if (stillEnqueued)
@@ -144,8 +145,7 @@ public partial class MareWizardModule
+ Environment.NewLine
+ "Have fun.");
AddHome(cb);
await _botServices.AddRegisteredRoleAsync(Context.Interaction.User).ConfigureAwait(false);
registerSuccess = true;
}
else
{
@@ -168,6 +168,8 @@ public partial class MareWizardModule
}
await ModifyInteraction(eb, cb).ConfigureAwait(false);
if (registerSuccess)
await _botServices.AddRegisteredRoleAsync(Context.Interaction.User).ConfigureAwait(false);
}
private async Task<(bool, string)> HandleRegisterModalAsync(EmbedBuilder embed, LodestoneModal arg)