Skip to content

Commit e8face1

Browse files
Merge branch 'master' into feature/improve-moderation
2 parents 9384be5 + 0feb2d9 commit e8face1

25 files changed

+1836
-407
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bunfig.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[test]
2+
preload = ["./tests/setup.ts"]
3+
4+
[test.env-file]
5+
path = ".env.test"

docker-compose.dev.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.8'
2-
31
services:
42
postgres:
53
image: postgres:18
@@ -12,7 +10,7 @@ services:
1210
ports:
1311
- "3306:5432"
1412
volumes:
15-
- postgres_data:/var/lib/postgresql/data
13+
- postgres_data:/var/lib/postgresql
1614
healthcheck:
1715
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
1816
interval: 10s

docker-compose.test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
postgres-test:
3+
image: postgres:18
4+
container_name: postgres-test
5+
restart: unless-stopped
6+
environment:
7+
POSTGRES_USER: root
8+
POSTGRES_PASSWORD: password
9+
POSTGRES_DB: database_test
10+
ports:
11+
- "5444:5432"
12+
tmpfs:
13+
- /var/lib/postgresql
14+
healthcheck:
15+
test: [ "CMD-SHELL", "pg_isready -U root -d database_test" ]
16+
interval: 5s
17+
timeout: 3s
18+
retries: 5

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"version": "echo $npm_package_version",
1111
"lint": "bunx biome check --fix",
12-
"typecheck": "bunx tsc --noEmit --build tsconfig.json",
12+
"typecheck": "bunx tsc --build --noEmit tsconfig.json",
1313
"typecheck:prod": "bunx tsc --noEmit -p tsconfig.production.json",
1414
"watch-dev": "bun --watch src/index.ts",
1515
"start": "bun --trace-warnings src/index.ts",
@@ -80,7 +80,7 @@
8080
"@types/sqlite3": "^5.1.0",
8181
"@types/string-similarity": "^4.0.2",
8282
"@types/validator": "^13.15.10",
83-
"globals": "^16.5.0",
83+
"globals": "^17.0.0",
8484
"husky": "^9.1.7",
8585
"lint-staged": "^16.2.7",
8686
"nodemon": "^3.1.11",

src/Config.prod.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ export const config: Config = {
2323
commands: {
2424
daily: "1059214166075912225",
2525
},
26-
26+
deletedMessageLog: {
27+
cacheTtlMs: 1000 * 60 * 60 * 24,
28+
excludedChannels: [],
29+
},
2730
roles: {
2831
tiers: [
2932
"821743100203368458", // @everyone (tier 0)

src/Config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ const devConfig: Config = {
2323
commands: {
2424
daily: "1029850807794937949",
2525
},
26+
deletedMessageLog: {
27+
cacheTtlMs: 1000 * 60 * 60 * 24,
28+
excludedChannels: [],
29+
},
2630
roles: {
2731
tiers: [
2832
"904478147351806012", // @everyone (tier 0)

src/config.type.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ export interface Config {
104104
archiveChannel: string;
105105
pingRole?: Snowflake;
106106
};
107+
deletedMessageLog?: {
108+
/** Cache TTL in milliseconds (default: 24 hours) */
109+
cacheTtlMs?: number;
110+
/** Additional channel IDs to exclude from tracking (mod channels auto-excluded) */
111+
excludedChannels?: Snowflake[];
112+
};
107113
branding: BrandingConfig;
108114
informationMessage?: InformationMessage;
109115
threatDetection?: ThreatDetectionConfig;

0 commit comments

Comments
 (0)