mirror of https://gitlab.com/litecord/litecord.git
Add public updates channel (to server, not channel type)
This commit is contained in:
parent
d9940b9d3f
commit
92489d0f43
|
|
@ -316,9 +316,9 @@ async def _update_guild(guild_id):
|
||||||
guild_id,
|
guild_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
channel_fields = ["afk_channel_id", "system_channel_id", "rules_channel_id"]
|
channel_fields = ["afk_channel_id", "system_channel_id", "rules_channel_id", "public_updates_channel_id"]
|
||||||
for field in [f for f in channel_fields if f in j]:
|
for field in [f for f in channel_fields if f in j]:
|
||||||
# setting to null should remove the link between the afk/sys/rules channel
|
# setting to null should remove the link between the afk/sys/rules/public updates channel
|
||||||
# to the guild.
|
# to the guild.
|
||||||
if j[field] is None:
|
if j[field] is None:
|
||||||
await app.db.execute(
|
await app.db.execute(
|
||||||
|
|
|
||||||
|
|
@ -293,6 +293,7 @@ GUILD_UPDATE = {
|
||||||
"system_channel_id": {"type": "snowflake", "required": False, "nullable": True},
|
"system_channel_id": {"type": "snowflake", "required": False, "nullable": True},
|
||||||
"features": {"type": "list", "required": False, "schema": {"type": "string"}},
|
"features": {"type": "list", "required": False, "schema": {"type": "string"}},
|
||||||
"rules_channel_id": {"type": "snowflake", "required": False, "nullable": True},
|
"rules_channel_id": {"type": "snowflake", "required": False, "nullable": True},
|
||||||
|
"public_updates_channel_id": {"type": "snowflake", "required": False, "nullable": True},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ class Storage:
|
||||||
explicit_content_filter, mfa_level,
|
explicit_content_filter, mfa_level,
|
||||||
embed_enabled, embed_channel_id::text,
|
embed_enabled, embed_channel_id::text,
|
||||||
widget_enabled, widget_channel_id::text,
|
widget_enabled, widget_channel_id::text,
|
||||||
system_channel_id::text, rules_channel_id::text, features,
|
system_channel_id::text, rules_channel_id::text, public_updates_channel_id::text, features,
|
||||||
banner, description
|
banner, description
|
||||||
FROM guilds
|
FROM guilds
|
||||||
WHERE guilds.id = $1
|
WHERE guilds.id = $1
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE guilds ADD COLUMN public_updates_channel_id bigint
|
||||||
Loading…
Reference in New Issue