mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
🐛 - fix: snakelize json when files are used (#3062)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
/* eslint-disable no-const-assign */
|
||||
import { calculateBits, camelToSnakeCase, camelize, delay, getBotIdFromToken, logger, processReactionString, urlToBase64 } from '@discordeno/utils'
|
||||
import { calculateBits, camelToSnakeCase, camelize, delay, getBotIdFromToken, logger, processReactionString, urlToBase64, snakelize } from '@discordeno/utils'
|
||||
|
||||
import { createInvalidRequestBucket } from './invalidBucket.js'
|
||||
import { Queue } from './queue.js'
|
||||
@@ -175,7 +175,7 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
|
||||
form.append(`file${i}`, options.files[i].blob, options.files[i].name)
|
||||
}
|
||||
|
||||
form.append('payload_json', JSON.stringify({ ...options.body, files: undefined }))
|
||||
form.append('payload_json', JSON.stringify(snakelize({ ...options.body, files: undefined })))
|
||||
|
||||
body = form
|
||||
|
||||
|
||||
Reference in New Issue
Block a user