Skip to content

Commit f7400a2

Browse files
committed
Updated solveTaskLogic to use ChatInputCommandInteraction, used by discord.js 14.21.0
1 parent 230fae5 commit f7400a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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
},

0 commit comments

Comments
 (0)