mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 16:30:08 +00:00
fix(rest): only calculate bits if not undefined (#3000)
This commit is contained in:
@@ -119,12 +119,12 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
|
||||
|
||||
for (const key of Object.keys(obj)) {
|
||||
// Keys that dont require snake casing
|
||||
if (['permissions', 'allow', 'deny'].includes(key)) {
|
||||
if (['permissions', 'allow', 'deny'].includes(key) && obj[key] !== undefined) {
|
||||
newObj[key] = calculateBits(obj[key])
|
||||
continue
|
||||
}
|
||||
|
||||
if (key === 'defaultMemberPermissions') {
|
||||
if (key === 'defaultMemberPermissions' && obj[key] !== undefined) {
|
||||
newObj.default_member_permissions = calculateBits(obj[key])
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user