yuudachi
yuudachi copied to clipboard
Framework does not support integer choices
https://github.com/Naval-Base/yuudachi/blob/e398023952eeb2451af2c29884d9b848a5051985/packages/http/src/util/verifyRequest.ts#L16
Verification has to happen with the raw body, not the stringified JSON body.
Discord sends "1.0"
for integers, which is parsed to "1"
, failing the hash comparison.
Getting the raw body seems to be annoyingly complicated in fastify: https://www.npmjs.com/package/fastify-raw-body