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:
+1
-1
@@ -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(),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user