summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorSamuel <34555296+Flam3rboy@users.noreply.github.com>2021-10-15 00:35:32 +0200
committerGitHub <noreply@github.com>2021-10-15 00:35:32 +0200
commitdd33d080c1938e2046aa4bdd728cf932ed1177c8 (patch)
treeaf43242783d73a75a0c7ebb09175081485fa7293 /util
parent:art: do not automatically create default guild (diff)
parent:bug: fix prune (diff)
downloadserver-dd33d080c1938e2046aa4bdd728cf932ed1177c8.tar.xz
Merge pull request #448 from Mr2u/master
Route #10 Prune and prune count
Diffstat (limited to 'util')
-rw-r--r--util/src/entities/Member.ts3
-rw-r--r--util/src/util/Snowflake.ts2
2 files changed, 4 insertions, 1 deletions
diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts
index 7d7ac40a..12b0b49a 100644
--- a/util/src/entities/Member.ts
+++ b/util/src/entities/Member.ts
@@ -84,6 +84,9 @@ export class Member extends BaseClassWithoutId {
 	@Column({ type: "simple-json" })
 	settings: UserGuildSettings;
 
+	@Column({ nullable: true })
+	last_message_id?: string;
+
 	// TODO: update
 	// @Column({ type: "simple-json" })
 	// read_state: ReadState;
diff --git a/util/src/util/Snowflake.ts b/util/src/util/Snowflake.ts
index f7a13388..3f6e3c63 100644
--- a/util/src/util/Snowflake.ts
+++ b/util/src/util/Snowflake.ts
@@ -84,7 +84,7 @@ export class Snowflake {
 	}
 
 	static generate() {
-		var time = BigInt(Date.now() - Snowflake.EPOCH) << 22n;
+		var time = BigInt(Date.now() - Snowflake.EPOCH) << BigInt(22);
 		var worker = Snowflake.workerId << 17n;
 		var process = Snowflake.processId << 12n;
 		var increment = Snowflake.INCREMENT++;