From 7b9becba58be3f7ffc953487cecacf7701e3f7c8 Mon Sep 17 00:00:00 2001 From: ITOH Date: Sun, 23 May 2021 20:27:55 +0200 Subject: [PATCH] fix: role.permissions should be bigint --- src/structures/role.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/structures/role.ts b/src/structures/role.ts index 377eaa729..d99c8ee17 100644 --- a/src/structures/role.ts +++ b/src/structures/role.ts @@ -129,6 +129,7 @@ export async function createDiscordenoRole( const role: DiscordenoRole = Object.create(baseRole, { ...props, + permissions: createNewProp(snowflakeToBigint(rest.permissions)), botId: createNewProp(tags.botId ? snowflakeToBigint(tags.botId) : undefined), isNitroBoostRole: createNewProp("premiumSubscriber" in tags), integrationId: createNewProp(tags.integrationId ? snowflakeToBigint(tags.integrationId) : undefined), @@ -138,7 +139,7 @@ export async function createDiscordenoRole( return role; } -export interface DiscordenoRole extends Omit { +export interface DiscordenoRole extends Omit { /** The role id */ id: bigint; /** The bot id that is associated with this role. */ @@ -149,6 +150,8 @@ export interface DiscordenoRole extends Omit { integrationId: bigint; /** The roles guildId */ guildId: bigint; + /** Permission bit set */ + permissions: bigint; /** Holds all the boolean toggles. */ bitfield: bigint;