Colorful roles

This commit is contained in:
Rory&
2025-09-29 18:38:06 +02:00
parent 43046f401d
commit 528662446c
6 changed files with 57 additions and 1 deletions
@@ -72,7 +72,7 @@ router.post(
throw DiscordApiErrors.MAXIMUM_ROLES.withParams(maxRoles);
const role = Role.create({
// values before ...body are default and can be overriden
// values before ...body are default and can be overridden
position: 1,
hoist: false,
color: 0,
@@ -88,6 +88,11 @@ router.post(
icon: undefined,
unicode_emoji: undefined,
id: Snowflake.generate(),
colors: {
primary_color: body.colors?.primary_color || body.color || 0,
secondary_color: body.colors?.secondary_color || undefined, // gradient
tertiary_color: body.colors?.tertiary_color || undefined, // "holographic"
},
});
await Promise.all([