chore(format): auto-format files with biome
This commit is contained in:
@@ -8,10 +8,7 @@ import {
|
||||
StreamType,
|
||||
VoiceConnection,
|
||||
} from "@discordjs/voice";
|
||||
import type {
|
||||
DiscordPlayerOwner,
|
||||
DiscordPlayOptions,
|
||||
} from "./mediaTypes.js";
|
||||
import type { DiscordPlayerOwner, DiscordPlayOptions } from "./mediaTypes.js";
|
||||
|
||||
export class DiscordPlayer {
|
||||
private player: AudioPlayer;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { retryWithBackoff } from "@bete/shared/utils";
|
||||
import {
|
||||
type DiscordGatewayAdapterCreator,
|
||||
EndBehaviorType,
|
||||
@@ -11,7 +13,7 @@ import {
|
||||
} from "@discordjs/voice";
|
||||
import type { Client, VoiceChannel } from "discord.js-selfbot-v13";
|
||||
import { config } from "../../shared/config/config.js";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import type { PcmBroadcaster } from "../message-capture/types.js";
|
||||
import { PacketFilter } from "./packetFilter.js";
|
||||
import { subscribeToAudioStream } from "./recorder/audioStream.js";
|
||||
import { OpusDecoder } from "./recorder/decoder.js";
|
||||
@@ -26,8 +28,6 @@ import {
|
||||
type RecordingSession,
|
||||
} from "./recorder/sessionRecording.js";
|
||||
import { uploadRecordingSegment } from "./recorder/uploader.js";
|
||||
import { retryWithBackoff } from "@bete/shared/utils";
|
||||
import type { PcmBroadcaster } from "../message-capture/types.js";
|
||||
|
||||
const logger = createChildLogger("recorder");
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import path from "node:path";
|
||||
import type { Client, VoiceChannel } from "discord.js-selfbot-v13";
|
||||
import { config } from "../../../shared/config/config.js";
|
||||
import type { SegmentMetadata, SegmentState, UserMetadata } from "../../message-capture/types.js";
|
||||
import type {
|
||||
SegmentMetadata,
|
||||
SegmentState,
|
||||
UserMetadata,
|
||||
} from "../../message-capture/types.js";
|
||||
|
||||
export async function collectUserMetadata(
|
||||
client: Client,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import type { UserMetadata } from "../../message-capture/types.js";
|
||||
import {
|
||||
buildMuxFfmpegArgs,
|
||||
runFfmpeg as defaultRunFfmpeg,
|
||||
} from "../ffmpegProcess.js";
|
||||
import type { UserMetadata } from "../../message-capture/types.js";
|
||||
|
||||
export type SessionRecordingStatus =
|
||||
| "pending"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { config } from "../../../shared/config/config.js";
|
||||
import {
|
||||
insertVoiceRecording,
|
||||
updateVoiceRecordingAsFailed,
|
||||
updateVoiceRecordingAsUploaded,
|
||||
} from "../../../shared/database/voiceRecordingRepo.js";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { uploadToTele } from "../teleUpload.js";
|
||||
|
||||
const logger = createChildLogger("recording-uploader");
|
||||
|
||||
@@ -37,14 +37,8 @@ export async function uploadToTele(input: {
|
||||
timeoutMs?: number;
|
||||
retries: number;
|
||||
}): Promise<TeleUploadResult> {
|
||||
const {
|
||||
buffer,
|
||||
filename,
|
||||
contentType,
|
||||
uploadUrl,
|
||||
timeoutMs,
|
||||
retries,
|
||||
} = input;
|
||||
const { buffer, filename, contentType, uploadUrl, timeoutMs, retries } =
|
||||
input;
|
||||
|
||||
const response = await retryWithBackoff(
|
||||
async () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getVoiceConnection, type VoiceConnection } from "@discordjs/voice";
|
||||
import type { Client, Guild, VoiceChannel } from "discord.js-selfbot-v13";
|
||||
import { AppError } from "@bete/shared/errors";
|
||||
import { createChildLogger } from "@bete/shared/logger";
|
||||
import { getVoiceConnection, type VoiceConnection } from "@discordjs/voice";
|
||||
import type { Client, Guild, VoiceChannel } from "discord.js-selfbot-v13";
|
||||
import { discordPlayer } from "./player.js";
|
||||
import { startRecording, stopRecording } from "./recorder.js";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user