fix(rest): bug with trying to pass string values in calculateBits() if object is already in Discord format in changeToDiscordFormat() (#3099)

This commit is contained in:
Awesome Stickz
2023-08-05 18:32:10 +00:00
committed by GitHub
parent e70a1788f5
commit 0aeadbb275
+2 -2
View File
@@ -126,10 +126,10 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
case 'permissions':
case 'allow':
case 'deny':
newObj[key] = calculateBits(value)
newObj[key] = typeof value === 'string' ? value : calculateBits(value)
continue
case 'defaultMemberPermissions':
newObj.default_member_permissions = calculateBits(value)
newObj.default_member_permissions = typeof value === 'string' ? value : calculateBits(value)
continue
case 'nameLocalizations':
newObj.name_localizations = value