Various small fixes, setting guild config now works

This commit is contained in:
Ske
2020-06-13 19:15:50 +02:00
parent 2038f023a0
commit c875c8af9f
9 changed files with 56 additions and 70 deletions

View File

@@ -67,7 +67,7 @@ namespace PluralKit.Bot
else
blacklist.UnionWith(affectedChannels.Select(c => c.Id));
await conn.ExecuteAsync("update servers set log_blacklist = @LogBlacklist where id = @Id",
new {ctx.Guild.Id, LogBlacklist = blacklist});
new {ctx.Guild.Id, LogBlacklist = blacklist.ToArray()});
}
await ctx.Reply(
@@ -99,7 +99,7 @@ namespace PluralKit.Bot
else
blacklist.UnionWith(affectedChannels.Select(c => c.Id));
await conn.ExecuteAsync("update servers set blacklist = @Blacklist where id = @Id",
new {ctx.Guild.Id, Blacklist = blacklist});
new {ctx.Guild.Id, Blacklist = blacklist.ToArray()});
}
await ctx.Reply($"{Emojis.Success} Channels {(onBlacklist ? "added to" : "removed from")} the proxy blacklist.");

View File

@@ -21,7 +21,7 @@ namespace PluralKit.Bot
{
// Load configuration and run global init stuff
var config = InitUtils.BuildConfiguration(args).Build();
InitUtils.Init();
Database.InitStatic();
// Set up DI container and modules
var services = BuildContainer(config);