Add preferred_locale field

This commit is contained in:
George Tsatsis 2020-03-31 01:04:58 +03:00
parent be089fe4dc
commit 4ff1916ebe
No known key found for this signature in database
GPG Key ID: 71F5AD643ABD99A4
4 changed files with 4 additions and 1 deletions

View File

@ -303,6 +303,7 @@ async def _update_guild(guild_id):
"explicit_content_filter", "explicit_content_filter",
"afk_timeout", "afk_timeout",
"description", "description",
"preferred_locale"
] ]
for field in [f for f in fields if f in j]: for field in [f for f in fields if f in j]:

View File

@ -294,6 +294,7 @@ GUILD_UPDATE = {
"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}, "public_updates_channel_id": {"type": "snowflake", "required": False, "nullable": True},
"preferred_locale": {"type": "string", "required": False, "nullable": True},
} }

View File

@ -202,7 +202,7 @@ class Storage:
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, public_updates_channel_id::text, features, system_channel_id::text, rules_channel_id::text, public_updates_channel_id::text, features,
banner, description banner, description, preferred_locale
FROM guilds FROM guilds
WHERE guilds.id = $1 WHERE guilds.id = $1
""", """,

View File

@ -0,0 +1 @@
ALTER TABLE guilds ADD COLUMN preferred_locale text;