Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 24f46cc

Browse files
committed
fix: fix welcome message hub name
1 parent 091da61 commit 24f46cc

File tree

4 files changed

+44
-45
lines changed

4 files changed

+44
-45
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@types/source-map-support": "^0.5.10",
5050
"cz-conventional-changelog": "^3.3.0",
5151
"eslint": "^9.3.0",
52-
"lint-staged": "^15.2.4",
52+
"lint-staged": "^15.2.5",
5353
"prettier": "^3.2.5",
5454
"prisma": "^5.14.0",
5555
"standard-version": "^9.5.0",

src/managers/EventManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export default abstract class EventManager {
290290
where: { userId: message.author.id, viewedNetworkWelcome: true },
291291
});
292292

293-
if (!userData) await sendWelcomeMsg(message, hubConnections.size.toString());
293+
if (!userData) await sendWelcomeMsg(message, hubConnections.size.toString(), hub.name);
294294

295295
// store the message in the db
296296
await storeMessageData(message, await Promise.all(sendResult), connection.hubId, dbReferrence);

src/scripts/network/helpers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
ActionRowBuilder,
88
} from 'discord.js';
99
import db from '../../utils/Db.js';
10-
import hub from '../../commands/slash/Main/hub/index.js';
1110
import { LINKS, REGEX, emojis } from '../../utils/Constants.js';
1211
import { censor } from '../../utils/Profanity.js';
1312
import { broadcastedMessages } from '@prisma/client';
@@ -137,7 +136,7 @@ export const generateJumpButton = (
137136
);
138137
};
139138

140-
export const sendWelcomeMsg = async (message: Message, totalServers: string) => {
139+
export const sendWelcomeMsg = async (message: Message, totalServers: string, hub: string) => {
141140
await db.userData.upsert({
142141
where: { userId: message.author.id },
143142
create: {
@@ -172,10 +171,10 @@ export const sendWelcomeMsg = async (message: Message, totalServers: string) =>
172171
{ phrase: 'network.welcome', locale: message.author.locale ?? 'en' },
173172
{
174173
user: message.author.toString(),
175-
hub: hub.name,
176174
channel: message.channel.toString(),
177175
emoji: emojis.wave_anim,
178176
rules_command: '</rules:924659340898619395>',
177+
hub,
179178
totalServers,
180179
},
181180
),

yarn.lock

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,13 +2016,6 @@ __metadata:
20162016
languageName: node
20172017
linkType: hard
20182018

2019-
"chalk@npm:5.3.0, chalk@npm:^5.3.0":
2020-
version: 5.3.0
2021-
resolution: "chalk@npm:5.3.0"
2022-
checksum: 10c0/8297d436b2c0f95801103ff2ef67268d362021b8210daf8ddbe349695333eb3610a71122172ff3b0272f1ef2cf7cc2c41fdaa4715f52e49ffe04c56340feed09
2023-
languageName: node
2024-
linkType: hard
2025-
20262019
"chalk@npm:^2.4.1, chalk@npm:^2.4.2":
20272020
version: 2.4.2
20282021
resolution: "chalk@npm:2.4.2"
@@ -2044,6 +2037,13 @@ __metadata:
20442037
languageName: node
20452038
linkType: hard
20462039

2040+
"chalk@npm:^5.3.0, chalk@npm:~5.3.0":
2041+
version: 5.3.0
2042+
resolution: "chalk@npm:5.3.0"
2043+
checksum: 10c0/8297d436b2c0f95801103ff2ef67268d362021b8210daf8ddbe349695333eb3610a71122172ff3b0272f1ef2cf7cc2c41fdaa4715f52e49ffe04c56340feed09
2044+
languageName: node
2045+
linkType: hard
2046+
20472047
"chardet@npm:^0.7.0":
20482048
version: 0.7.0
20492049
resolution: "chardet@npm:0.7.0"
@@ -2219,7 +2219,7 @@ __metadata:
22192219
languageName: node
22202220
linkType: hard
22212221

2222-
"commander@npm:12.1.0":
2222+
"commander@npm:~12.1.0":
22232223
version: 12.1.0
22242224
resolution: "commander@npm:12.1.0"
22252225
checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9
@@ -2631,7 +2631,7 @@ __metadata:
26312631
languageName: node
26322632
linkType: hard
26332633

2634-
"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4":
2634+
"debug@npm:4, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:~4.3.4":
26352635
version: 4.3.4
26362636
resolution: "debug@npm:4.3.4"
26372637
dependencies:
@@ -3086,7 +3086,7 @@ __metadata:
30863086
languageName: node
30873087
linkType: hard
30883088

3089-
"execa@npm:8.0.1":
3089+
"execa@npm:~8.0.1":
30903090
version: 8.0.1
30913091
resolution: "execa@npm:8.0.1"
30923092
dependencies:
@@ -3973,7 +3973,7 @@ __metadata:
39733973
google-translate-api-x: "npm:^10.6.8"
39743974
husky: "npm:^9.0.11"
39753975
js-yaml: "npm:^4.1.0"
3976-
lint-staged: "npm:^15.2.4"
3976+
lint-staged: "npm:^15.2.5"
39773977
lodash: "npm:^4.17.21"
39783978
lz-string: "npm:^1.5.0"
39793979
nsfwjs: "npm:4.1.0"
@@ -4280,7 +4280,7 @@ __metadata:
42804280
languageName: node
42814281
linkType: hard
42824282

4283-
"lilconfig@npm:3.1.1":
4283+
"lilconfig@npm:~3.1.1":
42844284
version: 3.1.1
42854285
resolution: "lilconfig@npm:3.1.1"
42864286
checksum: 10c0/311b559794546894e3fe176663427326026c1c644145be9e8041c58e268aa9328799b8dfe7e4dd8c6a4ae305feae95a1c9e007db3569f35b42b6e1bc8274754c
@@ -4294,27 +4294,27 @@ __metadata:
42944294
languageName: node
42954295
linkType: hard
42964296

4297-
"lint-staged@npm:^15.2.4":
4298-
version: 15.2.4
4299-
resolution: "lint-staged@npm:15.2.4"
4297+
"lint-staged@npm:^15.2.5":
4298+
version: 15.2.5
4299+
resolution: "lint-staged@npm:15.2.5"
43004300
dependencies:
4301-
chalk: "npm:5.3.0"
4302-
commander: "npm:12.1.0"
4303-
debug: "npm:4.3.4"
4304-
execa: "npm:8.0.1"
4305-
lilconfig: "npm:3.1.1"
4306-
listr2: "npm:8.2.1"
4307-
micromatch: "npm:4.0.6"
4308-
pidtree: "npm:0.6.0"
4309-
string-argv: "npm:0.3.2"
4310-
yaml: "npm:2.4.2"
4301+
chalk: "npm:~5.3.0"
4302+
commander: "npm:~12.1.0"
4303+
debug: "npm:~4.3.4"
4304+
execa: "npm:~8.0.1"
4305+
lilconfig: "npm:~3.1.1"
4306+
listr2: "npm:~8.2.1"
4307+
micromatch: "npm:~4.0.7"
4308+
pidtree: "npm:~0.6.0"
4309+
string-argv: "npm:~0.3.2"
4310+
yaml: "npm:~2.4.2"
43114311
bin:
43124312
lint-staged: bin/lint-staged.js
4313-
checksum: 10c0/a2638337cc2a8713f63bad3c1be86729f4ab25b276e225bf8da1949de2a1bdbd5ac6067a18b6c2ff3bd89cb689f6e2eb0ea596bddfd4e8bb60c49b4b97cb1d5b
4313+
checksum: 10c0/89c54489783510f86df15756659facade82e849c0cbfb564fe047b82be91c5d2b1b5608a4bfc5237bd7b9fd0e1206e66aa3e4f8cad3ac51e37a098b8492c2fa6
43144314
languageName: node
43154315
linkType: hard
43164316

4317-
"listr2@npm:8.2.1":
4317+
"listr2@npm:~8.2.1":
43184318
version: 8.2.1
43194319
resolution: "listr2@npm:8.2.1"
43204320
dependencies:
@@ -4601,16 +4601,6 @@ __metadata:
46014601
languageName: node
46024602
linkType: hard
46034603

4604-
"micromatch@npm:4.0.6":
4605-
version: 4.0.6
4606-
resolution: "micromatch@npm:4.0.6"
4607-
dependencies:
4608-
braces: "npm:^3.0.3"
4609-
picomatch: "npm:^4.0.2"
4610-
checksum: 10c0/38c62036b45f6d0062e96845c5652464bcfdb1ec21c8eec227c57048171529a5407321cdc7266b6c950c0f357d38dae33dc33f8de96f4b44b87670ed33c0c713
4611-
languageName: node
4612-
linkType: hard
4613-
46144604
"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4":
46154605
version: 4.0.5
46164606
resolution: "micromatch@npm:4.0.5"
@@ -4621,6 +4611,16 @@ __metadata:
46214611
languageName: node
46224612
linkType: hard
46234613

4614+
"micromatch@npm:~4.0.7":
4615+
version: 4.0.7
4616+
resolution: "micromatch@npm:4.0.7"
4617+
dependencies:
4618+
braces: "npm:^3.0.3"
4619+
picomatch: "npm:^2.3.1"
4620+
checksum: 10c0/58fa99bc5265edec206e9163a1d2cec5fabc46a5b473c45f4a700adce88c2520456ae35f2b301e4410fb3afb27e9521fb2813f6fc96be0a48a89430e0916a772
4621+
languageName: node
4622+
linkType: hard
4623+
46244624
"mime-db@npm:1.52.0":
46254625
version: 1.52.0
46264626
resolution: "mime-db@npm:1.52.0"
@@ -5319,7 +5319,7 @@ __metadata:
53195319
languageName: node
53205320
linkType: hard
53215321

5322-
"pidtree@npm:0.6.0":
5322+
"pidtree@npm:~0.6.0":
53235323
version: 0.6.0
53245324
resolution: "pidtree@npm:0.6.0"
53255325
bin:
@@ -6121,7 +6121,7 @@ __metadata:
61216121
languageName: node
61226122
linkType: hard
61236123

6124-
"string-argv@npm:0.3.2, string-argv@npm:^0.3.1":
6124+
"string-argv@npm:^0.3.1, string-argv@npm:~0.3.2":
61256125
version: 0.3.2
61266126
resolution: "string-argv@npm:0.3.2"
61276127
checksum: 10c0/75c02a83759ad1722e040b86823909d9a2fc75d15dd71ec4b537c3560746e33b5f5a07f7332d1e3f88319909f82190843aa2f0a0d8c8d591ec08e93d5b8dec82
@@ -6772,7 +6772,7 @@ __metadata:
67726772
languageName: node
67736773
linkType: hard
67746774

6775-
"yaml@npm:2.4.2":
6775+
"yaml@npm:~2.4.2":
67766776
version: 2.4.2
67776777
resolution: "yaml@npm:2.4.2"
67786778
bin:

0 commit comments

Comments
 (0)