Removed ugly styling library for html

This commit is contained in:
Myx
2023-10-14 21:08:08 +02:00
parent c51bc4bb32
commit ba11822fe5
6 changed files with 77 additions and 49 deletions

7
bot.ts
View File

@@ -92,6 +92,13 @@ async function joinRandomChannel(retries = 12) {
await entersState(connection, VoiceConnectionStatus.Ready, 30e3);
const soundFiles = fileSystem.readdirSync(soundsDir).filter(file => file.endsWith('.mp3'));
const soundFile = soundsDir + soundFiles[Math.floor(Math.random() * soundFiles.length)];
if(!soundFile) {
console.log(LoggerColors.Red, 'No sound files found');
scheduleNextJoin();
return;
}
const resource = createAudioResource(soundFile);
const player = createAudioPlayer();