summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-07-12 20:12:37 +0200
committerRory& <root@rory.gay>2025-09-29 18:38:06 +0200
commit528662446c3377032190c117f5a3fe2fa8f3b88e (patch)
tree4d58bc6e22e74be7e47e1a8f52d1a13bf894b53b /src/api
parentA little bit of formatting cleanup (diff)
downloadserver-ts-528662446c3377032190c117f5a3fe2fa8f3b88e.tar.xz
Colorful roles
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/guilds/#guild_id/roles/index.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/api/routes/guilds/#guild_id/roles/index.ts b/src/api/routes/guilds/#guild_id/roles/index.ts

index e2c34e7f..bd944324 100644 --- a/src/api/routes/guilds/#guild_id/roles/index.ts +++ b/src/api/routes/guilds/#guild_id/roles/index.ts
@@ -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([