Skip to content
Merged

init #258

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Classes/API/ApiConnService/WarnSearchmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class WarnSearchManager {
}

async createWarn(options: CreateWarnOptions) {
const id = await this.client.post<number>(
const idObj = await this.client.post<{ id: number }>(
Routes.discordWarns,
{
headers: { "Content-Type": "application/json" },
Expand All @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/features/state/member-list.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ns } from "@/commands/chat/state";
import { localize } from "@/i18n";
import {
AttachmentBuilder,
ChatInputCommandInteraction,
MessageFlags,
AttachmentBuilder,
ChatInputCommandInteraction,
MessageFlags,
} from "discord.js";

/**
Expand Down