mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-04-09 08:59:39 +00:00
Fixed time string
This commit is contained in:
6
bot.ts
6
bot.ts
@@ -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 } * * *`
|
||||
);
|
||||
}
|
||||
@@ -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.
|
||||
@@ -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 => {
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
Reference in New Issue
Block a user