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 { 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";
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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