feat: split ignores into 'ignore messages' and 'ignore entities'
This commit is contained in:
parent
d48ab7e16e
commit
0cac964aa6
32 changed files with 730 additions and 488 deletions
|
|
@ -62,10 +62,14 @@ public static class GuildImport
|
|||
GoGuild guild
|
||||
)
|
||||
{
|
||||
var channels = new Guild.ChannelConfig
|
||||
var messages = new Guild.MessageConfig
|
||||
{
|
||||
IgnoredChannels = guild.IgnoredChannels.ToList(),
|
||||
IgnoredUsers = guild.IgnoredUsers.ToList(),
|
||||
};
|
||||
|
||||
var channels = new Guild.ChannelConfig
|
||||
{
|
||||
GuildUpdate = guild.Channels.TryParse("GUILD_UPDATE"),
|
||||
GuildEmojisUpdate = guild.Channels.TryParse("GUILD_EMOJIS_UPDATE"),
|
||||
GuildRoleCreate = guild.Channels.TryParse("GUILD_ROLE_CREATE"),
|
||||
|
|
@ -97,13 +101,14 @@ public static class GuildImport
|
|||
|
||||
await conn.ExecuteAsync(
|
||||
"""
|
||||
insert into guilds (id, channels, banned_systems, key_roles)
|
||||
values (@Id, @Channels::jsonb, @BannedSystems, @KeyRoles)
|
||||
insert into guilds (id, channels, messages, banned_systems, key_roles)
|
||||
values (@Id, @channels::jsonb, @messages::jsonb, @BannedSystems, @KeyRoles)
|
||||
""",
|
||||
new
|
||||
{
|
||||
guild.Id,
|
||||
Channels = channels,
|
||||
messages,
|
||||
channels,
|
||||
guild.BannedSystems,
|
||||
guild.KeyRoles,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue