From ceb787ba36ed05f25f9acab86496d3054cb15013 Mon Sep 17 00:00:00 2001 From: Advaith Date: Sat, 27 Mar 2021 09:09:47 -0700 Subject: [PATCH] feat(PermissionFlagsBits): add `USE_APPLICATION_COMMANDS` (#85) Co-authored-by: Vlad Frangu Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- deno/v8/payloads/permissions.ts | 8 ++++---- v8/payloads/permissions.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deno/v8/payloads/permissions.ts b/deno/v8/payloads/permissions.ts index aa3dca23..05732a02 100644 --- a/deno/v8/payloads/permissions.ts +++ b/deno/v8/payloads/permissions.ts @@ -7,10 +7,9 @@ import type { Permissions, Snowflake } from '../../common/mod.ts'; /** * https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags * - * These flags are exported as `BigInt`s and NOT numbers. For most of them, you can - * convert them in a number by wrapping it in `Number()`, however be careful as any - * further bits added may cause issues if done so. Try to use BigInts as much as possible - * or modules that can replicate them in some way + * These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()` + * may cause issues, try to use BigInts as much as possible or modules that can + * replicate them in some way */ export const PermissionFlagsBits = { CREATE_INSTANT_INVITE: 1n << 0n, @@ -44,6 +43,7 @@ export const PermissionFlagsBits = { MANAGE_ROLES: 1n << 28n, MANAGE_WEBHOOKS: 1n << 29n, MANAGE_EMOJIS: 1n << 30n, + USE_APPLICATION_COMMANDS: 1n << 31n, } as const; /** diff --git a/v8/payloads/permissions.ts b/v8/payloads/permissions.ts index aff78f9a..1313bd19 100644 --- a/v8/payloads/permissions.ts +++ b/v8/payloads/permissions.ts @@ -7,10 +7,9 @@ import type { Permissions, Snowflake } from '../../common/index'; /** * https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags * - * These flags are exported as `BigInt`s and NOT numbers. For most of them, you can - * convert them in a number by wrapping it in `Number()`, however be careful as any - * further bits added may cause issues if done so. Try to use BigInts as much as possible - * or modules that can replicate them in some way + * These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()` + * may cause issues, try to use BigInts as much as possible or modules that can + * replicate them in some way */ export const PermissionFlagsBits = { CREATE_INSTANT_INVITE: 1n << 0n, @@ -44,6 +43,7 @@ export const PermissionFlagsBits = { MANAGE_ROLES: 1n << 28n, MANAGE_WEBHOOKS: 1n << 29n, MANAGE_EMOJIS: 1n << 30n, + USE_APPLICATION_COMMANDS: 1n << 31n, } as const; /**