From 33ea279714f6287eac2130ce63e81437f22c7012 Mon Sep 17 00:00:00 2001 From: Fleny Date: Sun, 24 Aug 2025 23:01:40 +0200 Subject: [PATCH] feat(types): Add PIN_MESSAGES permission (#4390) --- packages/rest/src/types.ts | 4 ++-- packages/types/src/discord/permissions.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/rest/src/types.ts b/packages/rest/src/types.ts index 08346de85..5e456e1cd 100644 --- a/packages/rest/src/types.ts +++ b/packages/rest/src/types.ts @@ -2858,7 +2858,7 @@ export interface RestManager { * @param {string} [reason] - An optional reason for the action, to be included in the audit log. * * @remarks - * Requires the `MANAGE_MESSAGES` permission. + * Requires the `PIN_MESSAGES` permission. * * Fires a _Channel Pins Update_ event. * @@ -2922,7 +2922,7 @@ export interface RestManager { * @param {string} [reason] - An optional reason for the action, to be included in the audit log. * * @remarks - * Requires the `MANAGE_MESSAGES` permission. + * Requires the `PIN_MESSAGES` permission. * * Fires a _Channel Pins Update_ event. * diff --git a/packages/types/src/discord/permissions.ts b/packages/types/src/discord/permissions.ts index f22f33b9f..978f61dfa 100644 --- a/packages/types/src/discord/permissions.ts +++ b/packages/types/src/discord/permissions.ts @@ -100,6 +100,8 @@ export const BitwisePermissionFlags = { SEND_POLLS: 1n << 49n, /** Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral. This only applies to apps not also installed to the server. */ USE_EXTERNAL_APPS: 1n << 50n, + /** Allows pinning and unpinning messages */ + PIN_MESSAGES: 1n << 51n, } as const /** https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags */