Skip to content

Commit 4f731e1

Browse files
committed
Squashed commit of the following:
commit 2267e77 Author: drklee3 <[email protected]> Date: Sun Apr 16 16:53:40 2023 -0700 Make prune count required, sort before filtering commit 28848b6 Author: drklee3 <[email protected]> Date: Sun Apr 16 15:37:26 2023 -0700 Remove twilight-dispatch, keydb, rabbitmq, ory oathkeeper commit 9e0c92c Author: drklee3 <[email protected]> Date: Sun Apr 16 13:56:40 2023 -0700 Escape notificiation search % chars commit 3e73a81 Author: drklee3 <[email protected]> Date: Sun Apr 16 13:56:22 2023 -0700 Add wip lookup commit b25e777 Author: drklee3 <[email protected]> Date: Tue Apr 11 21:16:45 2023 -0700 Update minor bugs commit a73633b Author: drklee3 <[email protected]> Date: Tue Apr 11 21:16:28 2023 -0700 Add db stats task commit 3c0fd11 Author: drklee3 <[email protected]> Date: Tue Apr 11 21:16:15 2023 -0700 reason, roles: Delete ephemeral messages after 5s commit db9e494 Author: drklee3 <[email protected]> Date: Tue Apr 11 21:15:35 2023 -0700 Use actual port for metrics server log commit 4a029d8 Author: drklee3 <[email protected]> Date: Tue Apr 11 21:15:17 2023 -0700 Update levelhandler to use kysely commit b93c549 Author: drklee3 <[email protected]> Date: Sun Apr 9 21:38:50 2023 -0700 Remove level role apply commit 3fd2ddb Author: drklee3 <[email protected]> Date: Sun Apr 9 20:21:26 2023 -0700 Remove catchApiError func commit 20e89b3 Author: drklee3 <[email protected]> Date: Sun Apr 9 17:36:23 2023 -0700 Add keysly pg client commit d9c2f5d Author: drklee3 <[email protected]> Date: Fri Apr 7 21:56:26 2023 -0700 Fix rest command registration commit bd8de44 Author: drklee3 <[email protected]> Date: Wed Apr 5 20:09:23 2023 -0700 Remove legacy rest usage commit 0b20665 Author: drklee3 <[email protected]> Date: Tue Apr 4 21:09:19 2023 -0700 Update remaining classes commit 8b1be95 Author: drklee3 <[email protected]> Date: Tue Apr 4 21:03:48 2023 -0700 Update legacy mod log notifier commit 81d2b8a Author: drklee3 <[email protected]> Date: Tue Apr 4 20:54:54 2023 -0700 Remove extra discord deps commit 31b339e Author: drklee3 <[email protected]> Date: Tue Apr 4 20:52:21 2023 -0700 Update deps, remove discordjs/builders commit a7e870b Author: drklee3 <[email protected]> Date: Tue Apr 4 20:01:19 2023 -0700 Update event handlers to Discord.js commit e04abed Author: drklee3 <[email protected]> Date: Fri Mar 24 18:46:48 2023 -0700 Remove resolver commit 8df12bf Author: drklee3 <[email protected]> Date: Fri Mar 24 18:46:28 2023 -0700 Update userinfo commit e285e77 Author: drklee3 <[email protected]> Date: Fri Mar 24 18:41:23 2023 -0700 Update xp commit a911a1f Author: drklee3 <[email protected]> Date: Fri Mar 24 18:33:15 2023 -0700 Update tags commit 3c989ae Author: drklee3 <[email protected]> Date: Fri Mar 24 18:14:17 2023 -0700 Update settings commit ba8b79c Author: drklee3 <[email protected]> Date: Fri Mar 24 17:12:15 2023 -0700 Update roles commit 5da17a6 Author: drklee3 <[email protected]> Date: Fri Mar 24 16:49:43 2023 -0700 Update user commands commit c07d77b Author: drklee3 <[email protected]> Date: Fri Mar 24 16:31:47 2023 -0700 Update userinfo service' commit a1050de Author: drklee3 <[email protected]> Date: Fri Mar 24 16:05:32 2023 -0700 Update catchApiError to not use callback func commit 595bde4 Author: drklee3 <[email protected]> Date: Fri Mar 24 15:54:06 2023 -0700 Update error response funcs to accept more interaction types commit d6fb219 Author: drklee3 <[email protected]> Date: Fri Mar 24 15:53:40 2023 -0700 Update lookup handler to use Discord.js commit ff77023 Author: drklee3 <[email protected]> Date: Thu Mar 23 21:51:02 2023 -0700 Update reason commands to Discord.js commit dafaa0d Author: drklee3 <[email protected]> Date: Thu Mar 23 21:13:43 2023 -0700 Remove amqp client commit 5582096 Author: drklee3 <[email protected]> Date: Thu Mar 23 21:08:34 2023 -0700 Update reminders to Discord.js commit 92996fa Author: drklee3 <[email protected]> Date: Thu Mar 23 20:54:10 2023 -0700 Update notifications to Discord.js commit 0f003bb Author: drklee3 <[email protected]> Date: Thu Mar 23 20:46:38 2023 -0700 Update ping to Discord.js commit 1cdf446 Author: drklee3 <[email protected]> Date: Thu Mar 23 20:46:21 2023 -0700 Update moderation commands to Discord.js commit c20364e Author: drklee3 <[email protected]> Date: Thu Mar 23 18:08:14 2023 -0700 Update moderation exec to use discord.js commit 73daaa8 Author: drklee3 <[email protected]> Date: Wed Mar 22 21:43:50 2023 -0700 Update ModActionData to use Discord.js commit e9ef847 Author: drklee3 <[email protected]> Date: Wed Mar 22 21:20:22 2023 -0700 Update client and parent handler classes to use discord.js commit f7500ff Author: drklee3 <[email protected]> Date: Wed Mar 22 19:52:50 2023 -0700 Add discord.js client, update config to use zod
1 parent d953c3e commit 4f731e1

File tree

123 files changed

+6755
-7902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+6755
-7902
lines changed

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

+546
Large diffs are not rendered by default.

.yarnrc.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
yarnPath: ".yarn/releases/yarn-berry.cjs"
2-
nodeLinker: "node-modules"
1+
nodeLinker: node-modules
2+
3+
plugins:
4+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
5+
spec: "@yarnpkg/plugin-interactive-tools"
6+
7+
yarnPath: .yarn/releases/yarn-berry.cjs

docker-compose.yml

+2-98
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ services:
1313
restart: unless-stopped
1414
environment:
1515
- NODE_ENV=production
16+
- DISCORD_TOKEN=$DISCORD_TOKEN
17+
- DATABASE_URL=$DATABASE_URL
1618
- SUSHII_GRAPHQL_TOKEN=$SUSHII_GRAPHQL_TOKEN
1719
- SENTRY_DSN=$SENTRY_DSN
18-
- DISCORD_TOKEN=$DISCORD_TOKEN
1920
# sushiiDev application ID, different from bot user id
2021
- APPLICATION_ID=193163942502072320
2122
# No per guild commands
2223
# - GUILD_ID=167058919611564043,418504865543749642
2324
- SUSHII_GRAPHQL_URL=http://sushii_data:8080/graphql
2425
- SUSHII_GRAPHQL_WS_URL=ws://sushii_data:8080/graphql
25-
- AMQP_URL=amqp://rabbitmq:5672
26-
- AMQP_QUEUE_NAME=gateway.recv
2726
- TWILIGHT_PROXY_URL=http://twilight-http-proxy:80/api
2827
- SUSHII_IMAGE_SERVER_URL=http://sushii-image-server:3000
2928
networks:
@@ -45,23 +44,6 @@ services:
4544
- sushii_net
4645
labels:
4746
- "traefik.enable=false"
48-
oathkeeper:
49-
image: oryd/oathkeeper:v0.38
50-
restart: unless-stopped
51-
command: serve --config=/etc/config/oathkeeper/config.yaml
52-
ports:
53-
- "4455:4455"
54-
- "4456:4456"
55-
environment:
56-
- TRACING_PROVIDER=jaeger
57-
- TRACING_PROVIDER_JAEGER_SAMPLING_SERVER_URL=http://jaeger:5778/sampling
58-
- TRACING_PROVIDER_JAEGER_LOCAL_AGENT_ADDRESS=jaeger:6831
59-
- TRACING_PROVIDER_JAEGER_SAMPLING_TYPE=const
60-
- TRACING_PROVIDER_JAEGER_SAMPLING_VALUE=1
61-
volumes:
62-
- ./ory/oathkeeper:/etc/config/oathkeeper
63-
networks:
64-
- sushii_net
6547
jaeger:
6648
image: jaegertracing/all-in-one
6749
restart: unless-stopped
@@ -89,84 +71,6 @@ services:
8971
- sushii_net
9072
labels:
9173
- "traefik.enable=false"
92-
twilight-dispatch:
93-
image: chamburr/twilight-dispatch:0.4.3
94-
restart: unless-stopped
95-
expose:
96-
- "8005" # prometheus
97-
environment:
98-
- RUST_LOG=info
99-
- BOT_TOKEN=$DISCORD_TOKEN
100-
- SHARDS_START=0
101-
- SHARDS_END=2
102-
- SHARDS_TOTAL=3
103-
- SHARDS_CONCURRENCY=1
104-
- SHARDS_WAIT=6
105-
- CLUSTERS=1
106-
- DEFAULT_QUEUE=true
107-
- RESUME=true
108-
- INTENTS=37391
109-
- LARGE_THRESHOLD=250
110-
- STATUS=online
111-
- ACTIVITY_TYPE=0
112-
- ACTIVITY_NAME=sushii.xyz
113-
# Discord channel logs
114-
- LOG_CHANNEL=749822555019280434
115-
- LOG_GUILD_CHANNEL=749822555019280434
116-
- STATE_ENABLED=true
117-
- STATE_MEMBER=true
118-
- STATE_MEMBER_TTL=60000
119-
- STATE_MESSAGE=true
120-
- STATE_MESSAGE_TTL=60000
121-
- STATE_PRESENCE=false
122-
- STATE_EMOJI=true
123-
- STATE_VOICE=false
124-
- STATE_OLD=false
125-
- RABBIT_HOST=rabbitmq
126-
- RABBIT_PORT=5672
127-
- RABBIT_USERNAME=guest
128-
- RABBIT_PASSWORD=guest
129-
- REDIS_HOST=keydb
130-
- REDIS_PORT=6379
131-
- PROMETHEUS_HOST=127.0.0.1
132-
- PROMETHEUS_PORT=8005
133-
networks:
134-
- sushii_net
135-
labels:
136-
- "traefik.enable=false"
137-
rabbitmq:
138-
image: rabbitmq:3-management
139-
container_name: rabbitmq
140-
restart: unless-stopped
141-
logging:
142-
options:
143-
max-size: "10m"
144-
max-file: "3"
145-
expose:
146-
- "5672"
147-
- "15672"
148-
env_file:
149-
# user/pass
150-
- .rabbitmq.env
151-
networks:
152-
- sushii_net
153-
labels:
154-
- "traefik.docker.network=sushii-2_web"
155-
- "traefik.http.services.rabbitmq.loadbalancer.server.port=15672"
156-
- "traefik.http.routers.rabbitmq.rule=Host(`rabbit.sushii.xyz`)"
157-
- "traefik.http.routers.rabbitmq.entrypoints=secure"
158-
- "traefik.http.routers.rabbitmq.tls.certresolver=acme"
159-
- "traefik.http.routers.rabbitmq.middlewares=auth@file"
160-
keydb:
161-
image: eqalpha/keydb:x86_64_v6.3.1
162-
container_name: sushii-keydb
163-
restart: unless-stopped
164-
expose:
165-
- "6379"
166-
networks:
167-
- sushii_net
168-
labels:
169-
- "traefik.enable=false"
17074
shlink:
17175
image: shlinkio/shlink:stable
17276
container_name: shlink

id_ecdsa.ci.pub.pem

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-----BEGIN PUBLIC KEY-----
2+
MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAAUxI31bMoFtD3N/T/LEvTttRkegZ
3+
O0tq34PyGRCe37cYk+ZW+d9DIib4AaE36k2wIrOZkRzjbcT2/s/fJZeyjSUAnxOd
4+
tcMdDhSeJz3ENui59djkAXp9/TU+n1AvrXKtdb67uxmGlC9+F+R6eiLXRAmNVh+u
5+
yTouMc8NBfsi8d2GdfQ=
6+
-----END PUBLIC KEY-----

packages/sushii-worker/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
"@typescript-eslint",
2020
],
2121
rules: {
22-
"quotes": ["error", "double"],
22+
"quotes": ["error", "double", { "avoidEscape": true }],
2323
"consistent-return": "off",
2424
"default-case": "off",
2525
"@typescript-eslint/explicit-function-return-type": "error",

packages/sushii-worker/graphql.schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -96425,15 +96425,15 @@
9642596425
},
9642696426
{
9642796427
"name": "specifiedBy",
96428-
"description": "Exposes a URL that specifies the behavior of this scalar.",
96428+
"description": "Exposes a URL that specifies the behaviour of this scalar.",
9642996429
"isRepeatable": false,
9643096430
"locations": [
9643196431
"SCALAR"
9643296432
],
9643396433
"args": [
9643496434
{
9643596435
"name": "url",
96436-
"description": "The URL that specifies the behavior of this scalar.",
96436+
"description": "The URL that specifies the behaviour of this scalar.",
9643796437
"type": {
9643896438
"kind": "NON_NULL",
9643996439
"name": null,

packages/sushii-worker/graphql/cache/getRedisGuild.graphql

-52
This file was deleted.

packages/sushii-worker/graphql/levelRoleApplyJob/addLevelRoleApplyJob.graphql

-27
This file was deleted.

packages/sushii-worker/graphql/levelRoleApplyJob/deleteLevelRoleApplyJob.graphql

-7
This file was deleted.

packages/sushii-worker/graphql/levelRoleApplyJob/getlevelRoleApplyJobByGuildId.graphql

-5
This file was deleted.

packages/sushii-worker/graphql/levelRoleApplyJob/levelApplyJob.fragment.graphql

-21
This file was deleted.

packages/sushii-worker/graphql/levelRoleApplyJob/updateLevelRoleApplyJob.graphql

-15
This file was deleted.

packages/sushii-worker/package.json

+12-8
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
"test": "jest",
88
"build": "tsc --skipLibCheck",
99
"build:graphql": "graphql-codegen --config codegen.yml",
10+
"codegen:pg": "kysely-codegen --out-file ./src/model/dbTypes.ts",
1011
"dev": "ts-node src/index.ts | pino-pretty -c -t"
1112
},
1213
"dependencies": {
1314
"@cloudamqp/amqp-client": "^2.1.0",
14-
"@discordjs/builders": "^1.4.0",
15-
"@discordjs/collection": "^0.5.0",
16-
"@discordjs/rest": "^0.3.0",
1715
"@godaddy/terminus": "^4.11.1",
1816
"@opentelemetry/auto-instrumentations-node": "^0.32.1",
1917
"@opentelemetry/exporter-trace-otlp-http": "^0.33.0",
@@ -28,27 +26,32 @@
2826
"cron": "^2.1.0",
2927
"dayjs": "^1.10.7",
3028
"discord-api-types": "next",
31-
"discord.js": "^14.5.0",
29+
"discord.js": "^14.9.0",
3230
"dotenv": "^16.0.0",
3331
"express": "^4.18.1",
34-
"graphql": "^16.3.0",
35-
"graphql-request": "^5.0.0",
32+
"graphql": "^16.6.0",
33+
"graphql-request": "5.1.0",
3634
"graphql-tag": "^2.12.6",
3735
"graphql-ws": "^5.11.2",
3836
"i18next": "^21.6.13",
3937
"i18next-fs-backend": "^1.1.4",
38+
"kysely": "^0.24.2",
39+
"kysely-codegen": "^0.10.0",
4040
"node-fetch": "2.6.7",
4141
"parse-duration": "^1.0.2",
4242
"path-to-regexp": "^6.2.1",
43+
"pg": "^8.10.0",
44+
"pg-cursor": "^2.9.0",
4345
"pino": "^7.8.0",
4446
"prom-client": "^14.0.1",
4547
"ts-results": "^3.3.0",
46-
"ws": "^8.11.0"
48+
"ws": "^8.11.0",
49+
"zod": "^3.21.4"
4750
},
4851
"devDependencies": {
4952
"@babel/core": "^7.17.10",
5053
"@babel/preset-typescript": "^7.16.7",
51-
"@graphql-codegen/cli": "2.6.2",
54+
"@graphql-codegen/cli": "^3.3.0",
5255
"@graphql-codegen/introspection": "2.1.1",
5356
"@graphql-codegen/typescript": "2.4.8",
5457
"@graphql-codegen/typescript-generic-sdk": "^3.0.4",
@@ -60,6 +63,7 @@
6063
"@types/jest": "^27.4.1",
6164
"@types/node": "^17.0.18",
6265
"@types/node-fetch": "^2.6.2",
66+
"@types/pg-cursor": "^2.7.0",
6367
"@typescript-eslint/eslint-plugin": "^5.12.0",
6468
"@typescript-eslint/parser": "^5.12.0",
6569
"eslint": "^8.9.0",

0 commit comments

Comments
 (0)