diff --git a/src/EllieBot/Bot.cs b/src/EllieBot/Bot.cs index d6101ea..af69cee 100644 --- a/src/EllieBot/Bot.cs +++ b/src/EllieBot/Bot.cs @@ -90,21 +90,17 @@ public sealed class Bot : IBot public IReadOnlyList GetCurrentGuildIds() => Client.Guilds.Select(x => x.Id).ToList().AsReadOnly(); - => Client.Guilds.Select(x => x.Id).ToList().AsReadOnly(); - private async Task AddServices() private async Task AddServices() { var startingGuildIdList = GetCurrentGuildIds().ToList(); var startTime = Stopwatch.GetTimestamp(); var bot = Client.CurrentUser; - await using (var uow = _db.GetDbContext()) await using (var uow = _db.GetDbContext()) { AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId); - AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList); } // var svcs = new StandardKernel(new NinjectSettings() @@ -272,7 +268,6 @@ public sealed class Bot : IBot try { await AddServices(); - await AddServices(); } catch (Exception ex) {