summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 18:01:49 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 18:01:49 +0200
commit7685e19835afdf0b403a676c16ada663ddcbc29d (patch)
treec20eba204fa1164fa9caf9c988aa41c721f57cdd /src/util
parent:bug: fix User Model guilds (diff)
downloadserver-7685e19835afdf0b403a676c16ada663ddcbc29d.tar.xz
:art: Convert id bigint to string
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Permissions.ts8
-rw-r--r--src/util/Snowflake.ts2
2 files changed, 5 insertions, 5 deletions
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();
 	}
 
 	/**