Added join button for manully triggering the bot

This commit is contained in:
Myx
2023-10-18 21:53:12 +02:00
parent ba7d6aef1e
commit d1bffddd46
4 changed files with 28 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { nextPlayBackTime } from './../bot';
import { joinRandomChannel, nextPlayBackTime } from './../bot';
import express from 'express';
import multer, { diskStorage } from 'multer';
import path from 'path';
@@ -149,6 +149,11 @@ app.delete('/sounds/:filename', (req, res) => {
app.use(express.static(path.join(__dirname, "web")));
app.get('/join', (_req, res) => {
joinRandomChannel();
res.send('Joining random channel.');
});
/**
* Starts the web server on either http or https protocol based on the availability of SSL certificates.
* @returns void