1 Commits

5 changed files with 5 additions and 11 deletions

View File

@@ -1,5 +0,0 @@
import dotenv from "dotenv";
dotenv.config();
export const DATA_DIR = process.env.DATA_DIR ?? "./data";
export const HISTORY_DIR_PATH = process.env.HISTORY_DIR_PATH ?? "./history";

View File

@@ -8,9 +8,9 @@ import { handleSoundboardButton } from "./soundboard";
import { AudioPlayerStatus, AudioPlayerState, createAudioPlayer } from '@discordjs/voice';
import { updatePlayer } from './playback';
import SpotifyWebApi from 'spotify-web-api-node';
import { DATA_DIR, HISTORY_DIR_PATH } from './config';
export { DATA_DIR, HISTORY_DIR_PATH };
export const DATA_DIR = "./data";
export const HISTORY_DIR_PATH = process.env.HISTORY_DIR_PATH ?? "./history";
// AUDIO
export const player = createAudioPlayer();

View File

@@ -14,7 +14,7 @@ import {
MessageFlags,
parseEmoji,
} from "discord.js";
import { DATA_DIR } from "./config";
import { DATA_DIR } from "./main";
import { connectToChannelByInteraction } from "./util/helpers";
import { playSoundboardFile } from "./playback";
import { PRIMARY_COLOR } from "./theme";

View File

@@ -1,7 +1,6 @@
import { spawn } from "node:child_process";
import fs from "node:fs";
import { DATA_DIR } from "../config";
import { spotify } from "../main";
import { DATA_DIR, spotify } from "../main";
import ytSearch from 'yt-search';
function ytDlpBin() {

View File

@@ -1,6 +1,6 @@
import path from "node:path";
import fs from "node:fs";
import { HISTORY_DIR_PATH } from "../config";
import { HISTORY_DIR_PATH } from "../main";
export async function add_to_history(data: HistoryObject) {
try {