summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-02 22:09:16 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-02 22:09:16 +1000
commitc1fab4043ac348d10102f850e643f715d7f8e2a9 (patch)
tree663875f7567ee85444d0c8485cda5530d3dfc02a
parentshow how long a user was timed out for in logs (diff)
downloadserver-c1fab4043ac348d10102f850e643f715d7f8e2a9.tar.xz
set message max length manually
-rw-r--r--slowcord/src/index.ts2
-rw-r--r--util/src/entities/Message.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/slowcord/src/index.ts b/slowcord/src/index.ts
index f741d355..20f0aee7 100644
--- a/slowcord/src/index.ts
+++ b/slowcord/src/index.ts
@@ -91,7 +91,7 @@ app.use((req, res, next) => {
 	}
 	else if (rateLimits[ip] > Date.now()) {
 		rateLimits[ip] += allowRequestsEveryMs;
-		console.log(`user ${ip} was timed out for ${(rateLimits[ip] - Date.now()) / 1000}s`);
+		console.log(`${new Date()} : user ${ip} was timed out for ${(rateLimits[ip] - Date.now()) / 1000}s`);
 		return res.sendStatus(429);
 	}
 	else {
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts
index e18cf691..7f46f1be 100644
--- a/util/src/entities/Message.ts
+++ b/util/src/entities/Message.ts
@@ -114,7 +114,7 @@ export class Message extends BaseClass {
 	@ManyToOne(() => Application)
 	application?: Application;
 
-	@Column({ nullable: true })
+	@Column({ nullable: true, length: 4000 })
 	content?: string;
 
 	@Column()