Remove device ID requirement for API
- The device ID is handled by the .env file
This commit is contained in:
@@ -10,8 +10,6 @@ GUILD_ID=""
|
||||
# Audio Config
|
||||
AUDIO_DEVICE_ID=""
|
||||
AUDIO_DEVICE_NAME=""
|
||||
# The level to open the noisegate and play audio to Discord, recommended to set to 10
|
||||
AUDIO_NOISE_GATE_OPEN="10"
|
||||
|
||||
# Client Config
|
||||
CLIENT_ID=
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
const { DebugBuilder } = require("../utilities/debugBuilder.js");
|
||||
const log = new DebugBuilder("client", "botController");
|
||||
const botLog = new DebugBuilder("client", "botController:bot");
|
||||
|
||||
// Modules
|
||||
const spawn = require('child_process').spawn;
|
||||
const { resolve } = require("path");
|
||||
require('dotenv').config();
|
||||
const { closeProcessWrapper } = require("../utilities/utilities");
|
||||
|
||||
// Global vars
|
||||
@@ -23,10 +24,10 @@ exports.getStatus = (req, res) => {
|
||||
* Start the bot and join the server and preset specified
|
||||
*/
|
||||
exports.joinServer = async (req, res) => {
|
||||
if (!req.body.clientId || !req.body.deviceId || !req.body.channelId) return res.send("500").json({"message": "You must include the client ID (discord token), device ID (ID of the audio device to use), channel ID (The discord ID of the channel to connect to)"});
|
||||
if (!req.body.clientId || !req.body.channelId) return res.send("500").json({"message": "You must include the client ID (discord token), channel ID (The discord ID of the channel to connect to)"});
|
||||
const deviceId = req.body.deviceId;
|
||||
const channelId = req.body.channelId;
|
||||
const clientId = req.body.clientId;
|
||||
const clientId = process.env.AUDIO_DEVICE_ID;
|
||||
const presetName = req.body.presetName;
|
||||
const NGThreshold = req.body.NGThreshold ?? 50
|
||||
|
||||
|
||||
Reference in New Issue
Block a user