Updated Bot.cs with a fix that stopped builds
Why was this a glitch? ¯\_(ツ)_/¯
This commit is contained in:
parent
81a6171526
commit
3e35c6ffc7
1 changed files with 0 additions and 5 deletions
|
@ -90,21 +90,17 @@ public sealed class Bot : IBot
|
||||||
|
|
||||||
public IReadOnlyList<ulong> GetCurrentGuildIds()
|
public IReadOnlyList<ulong> GetCurrentGuildIds()
|
||||||
=> Client.Guilds.Select(x => x.Id).ToList().AsReadOnly();
|
=> Client.Guilds.Select(x => x.Id).ToList().AsReadOnly();
|
||||||
=> Client.Guilds.Select(x => x.Id).ToList().AsReadOnly();
|
|
||||||
|
|
||||||
private async Task AddServices()
|
|
||||||
private async Task AddServices()
|
private async Task AddServices()
|
||||||
{
|
{
|
||||||
var startingGuildIdList = GetCurrentGuildIds().ToList();
|
var startingGuildIdList = GetCurrentGuildIds().ToList();
|
||||||
var startTime = Stopwatch.GetTimestamp();
|
var startTime = Stopwatch.GetTimestamp();
|
||||||
var bot = Client.CurrentUser;
|
var bot = Client.CurrentUser;
|
||||||
|
|
||||||
await using (var uow = _db.GetDbContext())
|
|
||||||
await using (var uow = _db.GetDbContext())
|
await using (var uow = _db.GetDbContext())
|
||||||
{
|
{
|
||||||
AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList);
|
AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList);
|
||||||
uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId);
|
uow.EnsureUserCreated(bot.Id, bot.Username, bot.Discriminator, bot.AvatarId);
|
||||||
AllGuildConfigs = await uow.GuildConfigs.GetAllGuildConfigs(startingGuildIdList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// var svcs = new StandardKernel(new NinjectSettings()
|
// var svcs = new StandardKernel(new NinjectSettings()
|
||||||
|
@ -272,7 +268,6 @@ public sealed class Bot : IBot
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await AddServices();
|
await AddServices();
|
||||||
await AddServices();
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue