fix(config): correct regex for DISCORD_TOKEN transformation to remove quotes

fix(moderation): update import statement for pagination to include file extension
This commit is contained in:
Asep Haryana Saputra
2026-05-21 11:46:08 +00:00
parent 37cb177b11
commit 4cd92303ef
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ const configSchema = z
DISCORD_TOKEN: z
.string()
.min(1, "DISCORD_TOKEN is required")
.transform((value) => value.replace(/^(\\"|')|(?:\\"|')$/g, "")),
.transform((value) => value.replace(/^("|')|(?:("|'))$/g, "")),
VOICE_CHANNEL_ID: z.string().min(1).optional(),
GUILD_ID: z.string().min(1).optional(),
TEXT_GUILD_ID: z.string().min(1).optional(),
+2 -2
View File
@@ -12,7 +12,7 @@ import {
import { getDatabase } from "../database/drizzle.ts";
import { attachmentsTable, messagesTable } from "../database/schema.ts";
import { createChildLogger } from "../logger.ts";
import { decodeCursor, encodeCursor } from "./pagination";
import { decodeCursor, encodeCursor } from "./pagination.ts";
import type {
AttachmentRecord,
MessageQuery,
@@ -105,7 +105,7 @@ function pageMessages(
return { data, nextCursor };
}
export { decodeCursor, encodeCursor } from "./pagination";
export { decodeCursor, encodeCursor } from "./pagination.ts";
export async function insertMessage(message: MessageRecord): Promise<void> {
try {