From 7685e19835afdf0b403a676c16ada663ddcbc29d Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 6 Apr 2021 18:01:49 +0200 Subject: :art: Convert id bigint to string --- src/util/Permissions.ts | 8 ++++---- src/util/Snowflake.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/util') diff --git a/src/util/Permissions.ts b/src/util/Permissions.ts index 809111bf..4bad70d3 100644 --- a/src/util/Permissions.ts +++ b/src/util/Permissions.ts @@ -121,7 +121,7 @@ export class Permissions extends BitField { guild, channel, }: { - user: { id: bigint; roles: bigint[] }; + user: { id: string; roles: string[] }; guild: { roles: Role[] }; channel?: { overwrites?: ChannelPermissionOverwrite[]; @@ -144,9 +144,9 @@ export class Permissions extends BitField { } export async function getPermission( - user_id: bigint, - guild_id: bigint, - channel_id?: bigint, + user_id: string, + guild_id: string, + channel_id?: string, cache?: { channel?: ChannelDocument | null; member?: MemberDocument | null } ) { var { channel, member } = cache || {}; diff --git a/src/util/Snowflake.ts b/src/util/Snowflake.ts index 9e94bbd9..1ccae43c 100644 --- a/src/util/Snowflake.ts +++ b/src/util/Snowflake.ts @@ -87,7 +87,7 @@ export class Snowflake { var worker = Snowflake.workerId << 17n; var process = Snowflake.processId << 12n; var increment = Snowflake.INCREMENT++; - return time | worker | process | increment; + return (time | worker | process | increment).toString(); } /** -- cgit 1.4.1