Skip to content

Commit 91b3f10

Browse files
authored
Merge pull request #506 from Luytan/505-fix-discord-bot-category
505 fix discord bot category
2 parents b7f3848 + f7400a2 commit 91b3f10

File tree

4 files changed

+50
-48
lines changed

4 files changed

+50
-48
lines changed

api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@graphile/operation-hooks": "^1.0.0",
2424
"@graphile/pg-pubsub": "4.13.0",
2525
"axios": "^1.7.7",
26-
"discord.js": "^14.17.3",
26+
"discord.js": "^14.21.0",
2727
"dotenv": "^16.4.5",
2828
"express": "^4.21.1",
2929
"graphile-utils": "4.13.0",

api/src/discord/agile/commands/linkUser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
ApplicationCommandOptionType,
33
ApplicationCommandType,
44
Client,
5-
CommandInteraction,
5+
ChatInputCommandInteraction,
66
} from "discord.js";
77
import { Command } from "../../interfaces/command";
88
import {
@@ -63,7 +63,7 @@ export async function changeDiscordUserRoleForCTFByDiscordId(
6363
return true;
6464
}
6565

66-
async function linkUserLogic(_client: Client, interaction: CommandInteraction) {
66+
async function linkUserLogic(_client: Client, interaction: ChatInputCommandInteraction) {
6767
const token = interaction.options.get("token", true).value as string;
6868

6969
const userId = await getUserByToken(token);
@@ -115,7 +115,7 @@ export const LinkUser: Command = {
115115
},
116116
],
117117
run: async (client, interaction) => {
118-
return linkUserLogic(client, interaction).catch((e) => {
118+
return linkUserLogic(client, interaction as ChatInputCommandInteraction).catch((e) => {
119119
console.error("Error during link user logic: ", e);
120120
});
121121
},

api/src/discord/agile/commands/solveTask.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
Client,
55
CommandInteraction,
66
Guild,
7+
ChatInputCommandInteraction,
78
} from "discord.js";
89
import { Command } from "../../interfaces/command";
910
import { getTaskFromId, setFlagForChallengeId } from "../../database/tasks";
@@ -43,7 +44,7 @@ export async function handleTaskSolved(
4344
message?.react(emojis[Math.floor(Math.random() * emojis.length)].toString());
4445
}
4546

46-
async function solveTaskLogic(client: Client, interaction: CommandInteraction) {
47+
async function solveTaskLogic(client: Client, interaction: ChatInputCommandInteraction) {
4748
const r = await getCurrentTaskChannelFromDiscord(interaction);
4849
if (r == null) return accessDenied(interaction);
4950

@@ -93,7 +94,7 @@ export const SolveTask: Command = {
9394
},
9495
],
9596
run: async (client, interaction) => {
96-
return solveTaskLogic(client, interaction).catch((e) => {
97+
return solveTaskLogic(client, interaction as ChatInputCommandInteraction).catch((e) => {
9798
console.error("Error during solve task logic: ", e);
9899
});
99100
},

api/yarn.lock

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ __metadata:
2121
languageName: node
2222
linkType: hard
2323

24-
"@discordjs/builders@npm:^1.10.0":
25-
version: 1.10.0
26-
resolution: "@discordjs/builders@npm:1.10.0"
24+
"@discordjs/builders@npm:^1.11.2":
25+
version: 1.11.2
26+
resolution: "@discordjs/builders@npm:1.11.2"
2727
dependencies:
28-
"@discordjs/formatters": "npm:^0.6.0"
28+
"@discordjs/formatters": "npm:^0.6.1"
2929
"@discordjs/util": "npm:^1.1.1"
3030
"@sapphire/shapeshift": "npm:^4.0.0"
31-
discord-api-types: "npm:^0.37.114"
31+
discord-api-types: "npm:^0.38.1"
3232
fast-deep-equal: "npm:^3.1.3"
3333
ts-mixer: "npm:^6.0.4"
3434
tslib: "npm:^2.6.3"
35-
checksum: 10/0f270d1d0f30f8d691fa8981ffb0be970c513d9649ce425f07a4a04be1d279bd4080facc6e75c5421bef15cfcb7eda2e5c0b0e3c1a6243798ed5d706864feabb
35+
checksum: 10/b3e76c12c170d6719c4ba3c755e81a0a58d93e9ed260fcd435990411c355c06f7984f1170d4332f544db09ee8a2bcea3421f63c46e1f84f8e62eee757dfa2659
3636
languageName: node
3737
linkType: hard
3838

@@ -50,29 +50,29 @@ __metadata:
5050
languageName: node
5151
linkType: hard
5252

53-
"@discordjs/formatters@npm:^0.6.0":
54-
version: 0.6.0
55-
resolution: "@discordjs/formatters@npm:0.6.0"
53+
"@discordjs/formatters@npm:^0.6.1":
54+
version: 0.6.1
55+
resolution: "@discordjs/formatters@npm:0.6.1"
5656
dependencies:
57-
discord-api-types: "npm:^0.37.114"
58-
checksum: 10/0003f7e580b1bb4d420b38c2eb5fc17a5bb0acaef55930a13c1028c1d15dfe2736ad6eeb6f43cb6e0fb9911d6f634efa26116a5495640ea66c46bc6d042172ea
57+
discord-api-types: "npm:^0.38.1"
58+
checksum: 10/131375d851f027381c3386664b7fcbd04eb3af34419fcb7702241f992226db153357fde5a342c0c1ada31b4f068f6c108bbb65c1c8cc70f17a9c7d44f79452c4
5959
languageName: node
6060
linkType: hard
6161

62-
"@discordjs/rest@npm:^2.4.1, @discordjs/rest@npm:^2.4.2":
63-
version: 2.4.2
64-
resolution: "@discordjs/rest@npm:2.4.2"
62+
"@discordjs/rest@npm:^2.5.1":
63+
version: 2.5.1
64+
resolution: "@discordjs/rest@npm:2.5.1"
6565
dependencies:
6666
"@discordjs/collection": "npm:^2.1.1"
6767
"@discordjs/util": "npm:^1.1.1"
6868
"@sapphire/async-queue": "npm:^1.5.3"
6969
"@sapphire/snowflake": "npm:^3.5.3"
7070
"@vladfrangu/async_event_emitter": "npm:^2.4.6"
71-
discord-api-types: "npm:^0.37.114"
71+
discord-api-types: "npm:^0.38.1"
7272
magic-bytes.js: "npm:^1.10.0"
7373
tslib: "npm:^2.6.3"
74-
undici: "npm:6.19.8"
75-
checksum: 10/55541ae3f88eacdeca35d041557b6f619910a987e97094cb4dbe2020e208fbf765332682b82321611f438631ce1618a150f2023231ac61b365efa9e739d8ae81
74+
undici: "npm:6.21.3"
75+
checksum: 10/2bee1f73b0e87de4357af482c95a37db47466b8b855f519b87a0263361f9dafc9cbea7087b91553ed0a8e7202144a73638bbc6d91653464a04babffb72ffe040
7676
languageName: node
7777
linkType: hard
7878

@@ -83,20 +83,20 @@ __metadata:
8383
languageName: node
8484
linkType: hard
8585

86-
"@discordjs/ws@npm:^1.2.0":
87-
version: 1.2.0
88-
resolution: "@discordjs/ws@npm:1.2.0"
86+
"@discordjs/ws@npm:^1.2.3":
87+
version: 1.2.3
88+
resolution: "@discordjs/ws@npm:1.2.3"
8989
dependencies:
9090
"@discordjs/collection": "npm:^2.1.0"
91-
"@discordjs/rest": "npm:^2.4.1"
91+
"@discordjs/rest": "npm:^2.5.1"
9292
"@discordjs/util": "npm:^1.1.0"
9393
"@sapphire/async-queue": "npm:^1.5.2"
9494
"@types/ws": "npm:^8.5.10"
9595
"@vladfrangu/async_event_emitter": "npm:^2.2.4"
96-
discord-api-types: "npm:^0.37.114"
96+
discord-api-types: "npm:^0.38.1"
9797
tslib: "npm:^2.6.2"
9898
ws: "npm:^8.17.0"
99-
checksum: 10/7a4cdd5ebede88b98f5d7c00551af607c863c8768a8ef8c96c657448476950533fc2231683f431980db363f19127849c72bd0fbec2f2e88b4c47f2552f5adc9d
99+
checksum: 10/35e322c398ea95127a47440810c1def0e55e90ab86e2dc59cedb5402df1485d59d86ae55e29514346c4437b1619c904265d187f93375c6743cd12a3558e7abda
100100
languageName: node
101101
linkType: hard
102102

@@ -1300,7 +1300,7 @@ __metadata:
13001300
"@typescript-eslint/eslint-plugin": "npm:^7.3.1"
13011301
"@typescript-eslint/parser": "npm:^7.16.0"
13021302
axios: "npm:^1.7.7"
1303-
discord.js: "npm:^14.17.3"
1303+
discord.js: "npm:^14.21.0"
13041304
dotenv: "npm:^16.4.5"
13051305
eslint: "npm:^8.57.0"
13061306
express: "npm:^4.21.1"
@@ -1410,30 +1410,31 @@ __metadata:
14101410
languageName: node
14111411
linkType: hard
14121412

1413-
"discord-api-types@npm:^0.37.114":
1414-
version: 0.37.116
1415-
resolution: "discord-api-types@npm:0.37.116"
1416-
checksum: 10/dc68214c6094e12c1bd43688dd14969d5f857c8c5bec04d280a1dd831cdd5b8d099c8c46354003f043d7e210aad0422cbc79ea1bcefb74b05679ba77d03b344b
1413+
"discord-api-types@npm:^0.38.1":
1414+
version: 0.38.17
1415+
resolution: "discord-api-types@npm:0.38.17"
1416+
checksum: 10/1313765ce904d160d4202b77679c8c2fce34830795996d0572a0848a1ad95b051dc925e6ede91997a9b4771d6dd460dd5a510a2a1a9ebbc3779e6b978560f78d
14171417
languageName: node
14181418
linkType: hard
14191419

1420-
"discord.js@npm:^14.17.3":
1421-
version: 14.17.3
1422-
resolution: "discord.js@npm:14.17.3"
1420+
"discord.js@npm:^14.21.0":
1421+
version: 14.21.0
1422+
resolution: "discord.js@npm:14.21.0"
14231423
dependencies:
1424-
"@discordjs/builders": "npm:^1.10.0"
1424+
"@discordjs/builders": "npm:^1.11.2"
14251425
"@discordjs/collection": "npm:1.5.3"
1426-
"@discordjs/formatters": "npm:^0.6.0"
1427-
"@discordjs/rest": "npm:^2.4.2"
1426+
"@discordjs/formatters": "npm:^0.6.1"
1427+
"@discordjs/rest": "npm:^2.5.1"
14281428
"@discordjs/util": "npm:^1.1.1"
1429-
"@discordjs/ws": "npm:^1.2.0"
1429+
"@discordjs/ws": "npm:^1.2.3"
14301430
"@sapphire/snowflake": "npm:3.5.3"
1431-
discord-api-types: "npm:^0.37.114"
1431+
discord-api-types: "npm:^0.38.1"
14321432
fast-deep-equal: "npm:3.1.3"
14331433
lodash.snakecase: "npm:4.1.1"
1434+
magic-bytes.js: "npm:^1.10.0"
14341435
tslib: "npm:^2.6.3"
1435-
undici: "npm:6.19.8"
1436-
checksum: 10/4df34dcce5fec945c3f117d0f23e13c4f51f7e7070051977b10a39100d0ebc36e8d3a44e1b7355b2c5490d2f589352a15e2629da3cf1339c896bdc09a10222b2
1436+
undici: "npm:6.21.3"
1437+
checksum: 10/6cfba49ac014eedf0c1f507114a75a9e50b156045b4ff61d5068d0f0395c649e2f6133e496221901498a93e33e34b89a2363f68be75ab0112d6bfdc2e58b31e5
14371438
languageName: node
14381439
linkType: hard
14391440

@@ -4315,10 +4316,10 @@ __metadata:
43154316
languageName: node
43164317
linkType: hard
43174318

4318-
"undici@npm:6.19.8":
4319-
version: 6.19.8
4320-
resolution: "undici@npm:6.19.8"
4321-
checksum: 10/19ae4ba38b029a664d99fd330935ef59136cf99edb04ed821042f27b5a9e84777265fb744c8a7abc83f2059afb019446c69a4ebef07bbc0ed6b2de8d67ef4090
4319+
"undici@npm:6.21.3":
4320+
version: 6.21.3
4321+
resolution: "undici@npm:6.21.3"
4322+
checksum: 10/b6b8f4a90e294c11fabbb174b471a310840695ed0154a44b81e9bb4a08867ed738c8a7eac4eb46c7902d502fbccf03fa2cf2e5f18d9a2218d82e4294e3f74a2b
43224323
languageName: node
43234324
linkType: hard
43244325

0 commit comments

Comments
 (0)