mirror of https://gitlab.com/litecord/litecord.git
Add discovery_splash
This commit is contained in:
parent
4ff1916ebe
commit
d786edffec
|
|
@ -297,13 +297,20 @@ async def _update_guild(guild_id):
|
|||
|
||||
await _guild_update_icon("banner", guild_id, j["banner"])
|
||||
|
||||
if to_update(j, guild, "discovery_splash"):
|
||||
if not await app.storage.has_feature(guild_id, "PUBLIC"):
|
||||
raise BadRequest("guild does not have PUBLIC feature")
|
||||
|
||||
await _guild_update_icon("discovery_splash", guild_id, j["discovery_splash"])
|
||||
|
||||
fields = [
|
||||
"verification_level",
|
||||
"default_message_notifications",
|
||||
"explicit_content_filter",
|
||||
"afk_timeout",
|
||||
"description",
|
||||
"preferred_locale"
|
||||
"preferred_locale",
|
||||
"discovery_splash"
|
||||
]
|
||||
|
||||
for field in [f for f in fields if f in j]:
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ GUILD_UPDATE = {
|
|||
"rules_channel_id": {"type": "snowflake", "required": False, "nullable": True},
|
||||
"public_updates_channel_id": {"type": "snowflake", "required": False, "nullable": True},
|
||||
"preferred_locale": {"type": "string", "required": False, "nullable": True},
|
||||
"discovery_splash": {"type": "string", "required": False, "nullable": True},
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class Storage:
|
|||
embed_enabled, embed_channel_id::text,
|
||||
widget_enabled, widget_channel_id::text,
|
||||
system_channel_id::text, rules_channel_id::text, public_updates_channel_id::text, features,
|
||||
banner, description, preferred_locale
|
||||
banner, description, preferred_locale, discovery_splash
|
||||
FROM guilds
|
||||
WHERE guilds.id = $1
|
||||
""",
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE guilds ADD COLUMN discovery_splash text;
|
||||
Loading…
Reference in New Issue