fix up some bot shit

This commit is contained in:
Stanley Dimant 2024-11-09 02:06:10 +01:00
parent e2e030be90
commit 028d1642e1
13 changed files with 120 additions and 274 deletions

View file

@ -16,7 +16,7 @@ public partial class MareWizardModule
_logger.LogInformation("{method}:{userId}", nameof(ComponentSecondary), Context.Interaction.User.Id);
using var mareDb = GetDbContext();
using var mareDb = await GetDbContext().ConfigureAwait(false);
var primaryUID = (await mareDb.LodeStoneAuth.Include(u => u.User).SingleAsync(u => u.DiscordId == Context.User.Id).ConfigureAwait(false)).User.UID;
var secondaryUids = await mareDb.Auth.CountAsync(p => p.PrimaryUserUID == primaryUID).ConfigureAwait(false);
EmbedBuilder eb = new();
@ -40,7 +40,7 @@ public partial class MareWizardModule
_logger.LogInformation("{method}:{userId}:{primary}", nameof(ComponentSecondaryCreate), Context.Interaction.User.Id, primaryUid);
using var mareDb = GetDbContext();
using var mareDb = await GetDbContext().ConfigureAwait(false);
EmbedBuilder eb = new();
eb.WithTitle("Secondary UID created");
eb.WithColor(Color.Green);