diff --git a/src/Classes/API/ApiConnService/WarnSearchmanager.ts b/src/Classes/API/ApiConnService/WarnSearchmanager.ts index f31f6c3..9120a74 100644 --- a/src/Classes/API/ApiConnService/WarnSearchmanager.ts +++ b/src/Classes/API/ApiConnService/WarnSearchmanager.ts @@ -131,7 +131,7 @@ export class WarnSearchManager { } async createWarn(options: CreateWarnOptions) { - const id = await this.client.post( + const idObj = await this.client.post<{ id: number }>( Routes.discordWarns, { headers: { "Content-Type": "application/json" }, @@ -142,14 +142,14 @@ export class WarnSearchManager { expires_at_utc: options.expires.toISOString(), }), }, - z.number(), + z.object({ id: z.number() }), ); // console.log(res); const now = new Date().toISOString(); return new Warn(this.client, { - id, + id: idObj.id, moderatorDiscordId: options.moderatorId, userWarnedDiscordId: options.targetId, reason: options.reason, diff --git a/src/features/state/member-list.ts b/src/features/state/member-list.ts index eee5d74..e11d99a 100644 --- a/src/features/state/member-list.ts +++ b/src/features/state/member-list.ts @@ -1,9 +1,9 @@ import { ns } from "@/commands/chat/state"; import { localize } from "@/i18n"; import { - AttachmentBuilder, - ChatInputCommandInteraction, - MessageFlags, + AttachmentBuilder, + ChatInputCommandInteraction, + MessageFlags, } from "discord.js"; /**