mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user