mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-23 10:52:30 +01:00
Welcome screen
This commit is contained in:
parent
a97bc5182d
commit
316efa02e8
@ -10506,8 +10506,7 @@
|
|||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"required": [
|
||||||
"channel_id",
|
"channel_id",
|
||||||
"description",
|
"description"
|
||||||
"emoji_name"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user