diff --git a/api/assets/schemas.json b/api/assets/schemas.json index 4464304b..f066f71e 100644 --- a/api/assets/schemas.json +++ b/api/assets/schemas.json @@ -10506,8 +10506,7 @@ "additionalProperties": false, "required": [ "channel_id", - "description", - "emoji_name" + "description" ] } }, diff --git a/api/src/routes/guilds/#guild_id/welcome_screen.ts b/api/src/routes/guilds/#guild_id/welcome-screen.ts similarity index 96% rename from api/src/routes/guilds/#guild_id/welcome_screen.ts rename to api/src/routes/guilds/#guild_id/welcome-screen.ts index 7141f17e..5c7a9daa 100644 --- a/api/src/routes/guilds/#guild_id/welcome_screen.ts +++ b/api/src/routes/guilds/#guild_id/welcome-screen.ts @@ -10,7 +10,7 @@ export interface GuildUpdateWelcomeScreenSchema { channel_id: string; description: string; emoji_id?: string; - emoji_name: string; + emoji_name?: string; }[]; enabled?: boolean; description?: string; @@ -36,6 +36,8 @@ router.patch("/", route({ body: "GuildUpdateWelcomeScreenSchema", permission: "M if (body.description) guild.welcome_screen.description = body.description; if (body.enabled != null) guild.welcome_screen.enabled = body.enabled; + await guild.save(); + res.sendStatus(204); });