mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-04-13 18:40:36 +00:00
Added join button for manully triggering the bot
This commit is contained in:
@@ -6,6 +6,25 @@ document.addEventListener('DOMContentLoaded', (event) => {
|
||||
})
|
||||
});
|
||||
|
||||
document.getElementById('joinButton').addEventListener('click', function() {
|
||||
this.disabled = true;
|
||||
|
||||
fetch('/join')
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
setTimeout(() => {
|
||||
this.disabled = false;
|
||||
}, 40000);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
setTimeout(() => {
|
||||
this.disabled = false;
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
|
||||
function loadNextPlaybackTime() {
|
||||
fetch('/nextplaybacktime')
|
||||
.then(response => response.text())
|
||||
|
||||
Reference in New Issue
Block a user