Browse Source

fixing whatever utopic broke part 4

master
JD 1 month ago committed by GitHub
parent
commit
5bb5f6a66b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      bot.js

5
bot.js

@ -46,10 +46,11 @@ app.use(bodyParser.urlencoded({ @@ -46,10 +46,11 @@ app.use(bodyParser.urlencoded({
}));
// Listen for the users local script to post the current track and log it to console
app.listen(process.env.PORT, () => console.log(`App listening on port ${process.env.PORT}!`));
app.listen(process.env.PORT, () => console.log(`App listening on port ${process.env.PORT}!`))
app.post('/endpoint', (req, res) => {
let trackName = req.body.trackName;
res.send('Track received!');
console.log(`Received ${req.body.trackName}`);
console.log(`Received ${trackName}`);
if (musicChannel) musicChannel.send(trackName); /* Post the current track in discord */
});

Loading…
Cancel
Save