ci: fix lint errors for CI
Deploy to VPS / deploy (push) Successful in 1m47s
Deploy to VPS / deploy (push) Successful in 1m47s
- Fix noImplicitAnyLet: add type to let match variable - Fix noAssignInExpressions: use matchAll() + for-of instead of while - Suppress useExhaustiveDependencies in mascot scroll effect - Suppress useSemanticElements for message card click handler
This commit is contained in:
@@ -2,7 +2,7 @@ import type { createChildLogger } from "@bete/shared/logger";
|
||||
import type { Client } from "discord.js-selfbot-v13";
|
||||
import type { CommandHandler } from "../modules/command-handler/commandHandler.js";
|
||||
import type { EventBroadcaster } from "../modules/event-broadcaster/index.js";
|
||||
import { stopMetricsServer } from "../modules/gateway-metrics/index.js";
|
||||
import type { stopMetricsServer } from "../modules/gateway-metrics/index.js";
|
||||
import type { VoicePcmWsClient } from "../modules/voice-pcm-ws/index.js";
|
||||
import { stopMuxerWorker } from "../modules/voice-recording/muxer.js";
|
||||
import type { VoiceController } from "../modules/voice-recording/voiceController.js";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createChildLogger } from "@bete/shared/logger";
|
||||
import { eq } from "drizzle-orm";
|
||||
import { getDatabase } from "../../shared/database/drizzle.js";
|
||||
import {
|
||||
ChannelCulture,
|
||||
type ChannelCulture,
|
||||
channelCulturesTable,
|
||||
} from "../../shared/database/schema.js";
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ Pedoman ini mencerminkan nilai-nilai yang dijunjung server. Terapkan dengan bija
|
||||
Prioritas tertinggi (ANCAMAN KESELAMATAN):
|
||||
- child_safety, violence, illegal_content — flag jika ada indikasi nyata
|
||||
- self_harm: BEDAKAN antara ancaman klinis nyata dengan hiperbola stres remaja (mis. "mati aja gua ngerjain tugas", "bunuh aku sekarang"). Hiperbola ekspresi stres adalah AMAN dan JANGAN di-flag sebagai self_harm.
|
||||
- Pornografi/NSFW, ajakan seksual, roleplay seksual → "sexual_content". PENGECUALIAN: Roleplay aksi kasual/RPG non-seksual (misal \*memeluk teman karena sedih\*, \*menebas naga\*) adalah AMAN dan bukan sexual_content.
|
||||
- Pornografi/NSFW, ajakan seksual, roleplay seksual → "sexual_content". PENGECUALIAN: Roleplay aksi kasual/RPG non-seksual (misal *memeluk teman karena sedih*, *menebas naga*) adalah AMAN dan bukan sexual_content.
|
||||
- Judi/promosi judi → "gambling"
|
||||
- Narkoba/promosi → "drugs"
|
||||
|
||||
@@ -425,7 +425,7 @@ const ALL_EXAMPLES: ExampleDef[] = [
|
||||
id: "13",
|
||||
title: "Obfuscation / Zalgo Text (Evasion)",
|
||||
input:
|
||||
'[target] id=14141 user=hater: ++++++K1[[ your $€/F" "~\`| \\\\0ve $ 1F ¥°U |}iE ®©',
|
||||
'[target] id=14141 user=hater: ++++++K1[[ your $€/F" "~`| \\\\0ve $ 1F ¥°U |}iE ®©',
|
||||
output:
|
||||
'{"results":[{"message_id":"14141","status":"flagged","flags":["harassment","hate_speech"],"score":0.95,"categories":["harassment","hate_speech"],"severity":"critical","confidence":0.95,"recommended_action":"delete","policy_version":"default-2026-05-30","evidence":["++++++K1[[ your $€/F","\\\\\\\\0ve $ 1F ¥°U |}iE"],"analysis":"Pesan menggunakan teknik obfuscation/simbol untuk menyembunyikan frasa \'Kill yourself I love if you die\'. Ini adalah ancaman dan pelecehan berat yang disamarkan."}]}',
|
||||
modes: ["text", "media", "mixed"],
|
||||
@@ -522,7 +522,7 @@ const ALL_EXAMPLES: ExampleDef[] = [
|
||||
},
|
||||
{
|
||||
id: "24",
|
||||
title: "Nabi palsu (SARA agama, Ba\'al)",
|
||||
title: "Nabi palsu (SARA agama, Ba'al)",
|
||||
input:
|
||||
"[target] id=24245 user=provokator: nabi palsu ba'al, sembah aja patung",
|
||||
output:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import type { z } from "zod";
|
||||
import {
|
||||
import type {
|
||||
RecommendedActionSchema,
|
||||
SeveritySchema,
|
||||
} from "./moderationSchemas.js";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createChildLogger } from "@bete/shared/logger";
|
||||
import { eq } from "drizzle-orm";
|
||||
import { getDatabase } from "../../shared/database/drizzle.js";
|
||||
import {
|
||||
UserProfile,
|
||||
type UserProfile,
|
||||
userProfilesTable,
|
||||
} from "../../shared/database/schema.js";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { and, desc, eq } from "drizzle-orm";
|
||||
import { getDatabase } from "../../shared/database/drizzle.js";
|
||||
import {
|
||||
messagesTable,
|
||||
UserReputation,
|
||||
type UserReputation,
|
||||
userReputationsTable,
|
||||
} from "../../shared/database/schema.js";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type CommandMessage, type CommandReply } from "@bete/shared";
|
||||
import type { CommandMessage, CommandReply } from "@bete/shared";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import type { Client } from "discord.js-selfbot-v13";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { type CommandMessage, type CommandReply } from "@bete/shared";
|
||||
import type { CommandMessage, CommandReply } from "@bete/shared";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { StreamType } from "@discordjs/voice";
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type CommandMessage, type CommandReply } from "@bete/shared";
|
||||
import type { CommandMessage, CommandReply } from "@bete/shared";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import type { Client } from "discord.js-selfbot-v13";
|
||||
import { createModerationAction } from "../message-capture/messageStore.js";
|
||||
|
||||
@@ -153,8 +153,8 @@ export function getCustomEmojiMetadata(
|
||||
): RichMessageMetadata["customEmojis"] {
|
||||
const CUSTOM_EMOJI_PATTERN = /<(a)?:([a-zA-Z0-9_]+):(\d+)>/g;
|
||||
const emojis: CustomEmojiEvidence[] = [];
|
||||
let match;
|
||||
while ((match = CUSTOM_EMOJI_PATTERN.exec(message.content)) !== null) {
|
||||
const matches = [...message.content.matchAll(CUSTOM_EMOJI_PATTERN)];
|
||||
for (const match of matches) {
|
||||
const [, animated, name, id] = match;
|
||||
const ext = animated ? "gif" : "png";
|
||||
emojis.push({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type ChildProcess, spawn } from "node:child_process";
|
||||
import { PassThrough, Readable } from "node:stream";
|
||||
import { PassThrough, type Readable } from "node:stream";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { StreamType } from "@discordjs/voice";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Transform, TransformCallback } from "node:stream";
|
||||
import { Transform, type TransformCallback } from "node:stream";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
|
||||
const logger = createChildLogger("packet-filter");
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Readable } from "node:stream";
|
||||
import type { Readable } from "node:stream";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import {
|
||||
AudioPlayer,
|
||||
type AudioPlayer,
|
||||
AudioPlayerStatus,
|
||||
type AudioResource,
|
||||
createAudioPlayer,
|
||||
createAudioResource,
|
||||
StreamType,
|
||||
VoiceConnection,
|
||||
type VoiceConnection,
|
||||
} from "@discordjs/voice";
|
||||
import type { DiscordPlayerOwner, DiscordPlayOptions } from "./mediaTypes.js";
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ export function createSpeakingHandler(
|
||||
|
||||
// Step 4: Open the first segment
|
||||
const activeSession = activeSessions.get(channel.guild.id);
|
||||
let currentSegment = segmentManager.open(oggPacketStream);
|
||||
const currentSegment = segmentManager.open(oggPacketStream);
|
||||
|
||||
// Step 5: Handle segment file completion
|
||||
currentSegment.out.on("finish", () => {
|
||||
|
||||
Reference in New Issue
Block a user