mirror of https://gitlab.com/litecord/litecord.git
black fmt pass
This commit is contained in:
parent
d0f1729fd6
commit
29091293f5
|
|
@ -179,4 +179,3 @@ async def _del_emoji(guild_id, emoji_id):
|
|||
|
||||
await _dispatch_emojis(guild_id)
|
||||
return "", 204
|
||||
|
||||
|
|
|
|||
|
|
@ -311,4 +311,3 @@ async def delete_guild_role(guild_id, role_id):
|
|||
)
|
||||
|
||||
return "", 204
|
||||
|
||||
|
|
|
|||
|
|
@ -323,7 +323,12 @@ async def _update_guild(guild_id):
|
|||
guild_id,
|
||||
)
|
||||
|
||||
channel_fields = ["afk_channel_id", "system_channel_id", "rules_channel_id", "public_updates_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]:
|
||||
# setting to null should remove the link between the afk/sys/rules/public updates channel
|
||||
# to the guild.
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ async def _get_guild_banner(guild_id: int, icon_file: str):
|
|||
icon_hash, ext = splitext_(icon_file)
|
||||
return await send_icon("banner", guild_id, icon_hash, ext=ext)
|
||||
|
||||
|
||||
@bp.route("/discovery-splashes/<int:guild_id>/<icon_file>", methods=["GET"])
|
||||
async def _get_discovery_splash(guild_id: int, icon_file: str):
|
||||
icon_hash, ext = splitext_(icon_file)
|
||||
|
|
|
|||
|
|
@ -528,4 +528,3 @@ class IconManager:
|
|||
await self.delete(old_icon)
|
||||
|
||||
return await self.put(scope, key, new_icon_data, **kwargs)
|
||||
|
||||
|
|
|
|||
|
|
@ -287,13 +287,33 @@ GUILD_UPDATE = {
|
|||
"verification_level": {"type": "verification_level", "required": False},
|
||||
"default_message_notifications": {"type": "msg_notifications", "required": False},
|
||||
"explicit_content_filter": {"type": "explicit", "required": False},
|
||||
"afk_channel_id": {"type": "snowflake", "coerce": int, "required": False, "nullable": True},
|
||||
"afk_channel_id": {
|
||||
"type": "snowflake",
|
||||
"coerce": int,
|
||||
"required": False,
|
||||
"nullable": True,
|
||||
},
|
||||
"afk_timeout": {"type": "number", "required": False},
|
||||
"owner_id": {"type": "snowflake", "coerce": int, "required": False},
|
||||
"system_channel_id": {"type": "snowflake", "coerce": int, "required": False, "nullable": True},
|
||||
"system_channel_id": {
|
||||
"type": "snowflake",
|
||||
"coerce": int,
|
||||
"required": False,
|
||||
"nullable": True,
|
||||
},
|
||||
"features": {"type": "list", "required": False, "schema": {"type": "string"}},
|
||||
"rules_channel_id": {"type": "snowflake", "coerce": int, "required": False, "nullable": True},
|
||||
"public_updates_channel_id": {"type": "snowflake", "coerce": int, "required": False, "nullable": True},
|
||||
"rules_channel_id": {
|
||||
"type": "snowflake",
|
||||
"coerce": int,
|
||||
"required": False,
|
||||
"nullable": True,
|
||||
},
|
||||
"public_updates_channel_id": {
|
||||
"type": "snowflake",
|
||||
"coerce": int,
|
||||
"required": False,
|
||||
"nullable": True,
|
||||
},
|
||||
"preferred_locale": {"type": "string", "required": False, "nullable": True},
|
||||
"discovery_splash": {"type": "string", "required": False, "nullable": True},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue