1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-23 10:52:30 +01:00

Welcome screen

This commit is contained in:
Madeline 2022-07-04 19:45:28 +10:00
parent a97bc5182d
commit 316efa02e8
2 changed files with 4 additions and 3 deletions

View File

@ -10506,8 +10506,7 @@
"additionalProperties": false, "additionalProperties": false,
"required": [ "required": [
"channel_id", "channel_id",
"description", "description"
"emoji_name"
] ]
} }
}, },

View File

@ -10,7 +10,7 @@ export interface GuildUpdateWelcomeScreenSchema {
channel_id: string; channel_id: string;
description: string; description: string;
emoji_id?: string; emoji_id?: string;
emoji_name: string; emoji_name?: string;
}[]; }[];
enabled?: boolean; enabled?: boolean;
description?: string; description?: string;
@ -36,6 +36,8 @@ router.patch("/", route({ body: "GuildUpdateWelcomeScreenSchema", permission: "M
if (body.description) guild.welcome_screen.description = body.description; if (body.description) guild.welcome_screen.description = body.description;
if (body.enabled != null) guild.welcome_screen.enabled = body.enabled; if (body.enabled != null) guild.welcome_screen.enabled = body.enabled;
await guild.save();
res.sendStatus(204); res.sendStatus(204);
}); });