From 04b585c73916992bd502a03faef1eb51798bed95 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Wed, 28 Apr 2021 22:05:46 +0200 Subject: [PATCH] fix buggs --- src/helpers/commands/edit_slash_command_permissions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/commands/edit_slash_command_permissions.ts b/src/helpers/commands/edit_slash_command_permissions.ts index 5617f3a9d..1ea764d8a 100644 --- a/src/helpers/commands/edit_slash_command_permissions.ts +++ b/src/helpers/commands/edit_slash_command_permissions.ts @@ -2,6 +2,7 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; import { ApplicationCommandPermissions } from "../../types/interactions/application_command_permissions.ts"; import { endpoints } from "../../util/constants.ts"; +import { camelKeysToSnakeCase } from "../../util/utils.ts"; /** Edits command permissions for a specific command for your application in a guild. */ export async function editSlashCommandPermissions( @@ -12,6 +13,6 @@ export async function editSlashCommandPermissions( return await rest.runMethod( "put", endpoints.COMMANDS_PERMISSION(applicationId, guildId, commandId), - options, + { permissions: camelKeysToSnakeCase(options) }, ); }