Compare commits
1 Commits
master
...
cursor/sou
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3d9669b28 |
5
src/config.ts
Normal file
5
src/config.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
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";
|
||||
@@ -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 const DATA_DIR = "./data";
|
||||
export const HISTORY_DIR_PATH = process.env.HISTORY_DIR_PATH ?? "./history";
|
||||
export { DATA_DIR, HISTORY_DIR_PATH };
|
||||
|
||||
// AUDIO
|
||||
export const player = createAudioPlayer();
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
MessageFlags,
|
||||
parseEmoji,
|
||||
} from "discord.js";
|
||||
import { DATA_DIR } from "./main";
|
||||
import { DATA_DIR } from "./config";
|
||||
import { connectToChannelByInteraction } from "./util/helpers";
|
||||
import { playSoundboardFile } from "./playback";
|
||||
import { PRIMARY_COLOR } from "./theme";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { spawn } from "node:child_process";
|
||||
import fs from "node:fs";
|
||||
import { DATA_DIR, spotify } from "../main";
|
||||
import { DATA_DIR } from "../config";
|
||||
import { spotify } from "../main";
|
||||
import ytSearch from 'yt-search';
|
||||
|
||||
function ytDlpBin() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import path from "node:path";
|
||||
import fs from "node:fs";
|
||||
import { HISTORY_DIR_PATH } from "../main";
|
||||
import { HISTORY_DIR_PATH } from "../config";
|
||||
|
||||
export async function add_to_history(data: HistoryObject) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user