Fixed time string

This commit is contained in:
Myx
2023-10-15 03:56:17 +02:00
parent 2e87f14ced
commit 5c9fec4767
4 changed files with 11 additions and 8 deletions

6
bot.ts
View File

@@ -121,7 +121,7 @@ function scheduleNextJoin(){
log(randomInterval);
nextPlayBackTime = new Date(new Date().getTime() + randomInterval * 60000).toString();
nextPlayBackTime = new Date(new Date().getTime() + randomInterval * 60000).toTimeString();
const minutes = randomInterval % 60;
const hours = Math.floor(randomInterval / 60);
@@ -144,8 +144,8 @@ function log(waitTime: number){
console.log(
LoggerColors.Cyan, `
Wait time: ${waitTime} minutes,
Current time: ${currentTime.toString()},
Next join time: ${nextJoinTime.toString()},
Current time: ${currentTime.toTimeString()},
Next join time: ${nextJoinTime.toTimeString()},
Cron: ${minutes} ${hours == 0 ? '*' : hours } * * *`
);
}

View File

@@ -10,6 +10,4 @@ A simple webserver for managing sounds played by the bot.
## How it works,
the bot should give you an address on startup, but if you miss it, it should be http://localhost:8080 if you host it somewhere its the ip-address of the server instead of localhost.
you can manage uploaded files from the page. Upload a file and it will get stored in the sounds folder. There is no authentication so if you decide to open it up for others anyone can upload and delete.
i tested ``foundation`` because the sake of it for the design, i dont think i will use it again on a project.
you can manage uploaded files from the page. Upload a file and it will get stored in the sounds folder. There is no authentication so if you decide to open it up for others anyone can upload and delete.

View File

@@ -156,8 +156,6 @@ document.getElementById('uploadForm').addEventListener('submit', function(event)
return;
}
alert('File uploaded successfully.');
// Call loadFiles again to update the file list
loadFiles();
})
.catch(error => {

View File

@@ -1,7 +1,14 @@
![randommemer discord bot logotype](/client/web/logo.svg)
# get started
install ffmpeg
* linux: ``sudo apt install ffmpeg``
* general install (all OS): [Link to download](https://ffmpeg.org/download.html)
run ``npm i`` then ``npm run create`` insert your token in the .env file in root folder. Then run ``npm start``
on server i run this using [pm2](https://pm2.keymetrics.io/) to manage it.
## what is this!?
bot randomly picks mp3 files from folder and plays them randomly in joined server.