From f2840ec5f8b1c790d5caaa72a19f5571bb9e99ad Mon Sep 17 00:00:00 2001 From: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Date: Sat, 26 Nov 2022 15:01:54 -0500 Subject: [PATCH] Update packages/core/src/api/applicationCommands.ts Co-authored-by: Almeida --- packages/core/src/api/applicationCommands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/api/applicationCommands.ts b/packages/core/src/api/applicationCommands.ts index f49ded884ac1..1f66c1a45711 100644 --- a/packages/core/src/api/applicationCommands.ts +++ b/packages/core/src/api/applicationCommands.ts @@ -232,7 +232,7 @@ export class ApplicationCommandsAPI { data: RESTPutAPIApplicationCommandPermissionsJSONBody, ) { return this.rest.put(Routes.applicationCommandPermissions(applicationId, guildId, commandId), { - headers: { Authorization: `Bearer ${userToken.replaceAll(/\bbearer\b/gim, '').trimStart()}` }, + headers: { Authorization: `Bearer ${userToken.replace('Bearer ', '')}` }, auth: false, body: data, }) as Promise;