diff --git a/litecord/blueprints/guilds.py b/litecord/blueprints/guilds.py index e1b9a39..02d1bf9 100644 --- a/litecord/blueprints/guilds.py +++ b/litecord/blueprints/guilds.py @@ -303,6 +303,7 @@ async def _update_guild(guild_id): "explicit_content_filter", "afk_timeout", "description", + "preferred_locale" ] for field in [f for f in fields if f in j]: diff --git a/litecord/schemas.py b/litecord/schemas.py index 8cf9b09..4a8cc04 100644 --- a/litecord/schemas.py +++ b/litecord/schemas.py @@ -294,6 +294,7 @@ GUILD_UPDATE = { "features": {"type": "list", "required": False, "schema": {"type": "string"}}, "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}, } diff --git a/litecord/storage.py b/litecord/storage.py index 5ab71b6..76eae62 100644 --- a/litecord/storage.py +++ b/litecord/storage.py @@ -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 + banner, description, preferred_locale FROM guilds WHERE guilds.id = $1 """, diff --git a/manage/cmd/migration/scripts/7_add_prefered_locale.sql b/manage/cmd/migration/scripts/7_add_prefered_locale.sql new file mode 100644 index 0000000..ce76150 --- /dev/null +++ b/manage/cmd/migration/scripts/7_add_prefered_locale.sql @@ -0,0 +1 @@ +ALTER TABLE guilds ADD COLUMN preferred_locale text; \ No newline at end of file