summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-11-06 18:16:09 +0100
committerRory& <root@rory.gay>2026-11-06 18:16:09 +0100
commit53481d60f484b1e9aac5ebc17c523d3dff1654ed (patch)
tree45b8623ff77ab0693a7b0c5dcfb093205fb586c8 /src/api
parentRoles: serialize to RoleResponse, send description as null rather than omitte... (diff)
downloadserver-ts-53481d60f484b1e9aac5ebc17c523d3dff1654ed.tar.xz
include member roles in interactions
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/interactions/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/interactions/index.ts b/src/api/routes/interactions/index.ts

index 935242708..b925d241c 100644 --- a/src/api/routes/interactions/index.ts +++ b/src/api/routes/interactions/index.ts
@@ -180,7 +180,7 @@ async function resolveInteractionDataRecursive(opts: ApplicationCommandOption[], // TODO: different schema, cba to fix right now if ("value" in opt && !(<string>opt.value in res.users)) { if (!scope.guild_id) throw new Error("Cannot resolve users/members in non-guild context"); - const member = await Member.findOneOrFail({ where: { id: opt.value as string }, relations: { user: true } }); + const member = await Member.findOneOrFail({ where: { id: opt.value as string, guild_id: scope.guild_id }, relations: { user: true, roles: true } }); res.members[opt.value as string] = { ...member.toPublicMember(), mute: undefined, deaf: undefined, user: undefined } as InteractionResolvedPartialMember; res.users[opt.value as string] = member.user.toPartialUser(); }