diff --git a/hackclub-spotify-bot/src/index.js b/hackclub-spotify-bot/src/index.js index 1b2b721..73170a1 100644 --- a/hackclub-spotify-bot/src/index.js +++ b/hackclub-spotify-bot/src/index.js @@ -202,11 +202,16 @@ app.post("/spotify/submitsong", async (req, res) => { added_at: Date.now(), }); addSongToPlaylist(formattedURI); - fetch("https://slack.mybot.saahild.com/send-private", { + fetch("https://slack.mybot.saahild.com/send-spotify", { method: "POST", body: JSON.stringify({ - channel: "C07RE4N7S4B", - text: `:new_spotify: New Song: ${songurl} - added by <@${req.session.info.user.id}>`, + // message: { + // channel: "C07RE4N7S4B", + // text: `:new_spotify: New Song: ${songurl} - added by <@${req.session.info.user.id}>`, + // }, + songurl, + user: req.session.info.user.id, + noping: Boolean(process.env.TESTING), }), headers: { Authorization: process.env.AUTH_FOR_ZEON, @@ -215,32 +220,32 @@ app.post("/spotify/submitsong", async (req, res) => { }) .then((r) => r.json()) .then((d) => { - fetch("https://slack.mybot.saahild.com/send-private", { - method: "POST", - body: JSON.stringify({ - channel: "C07RE4N7S4B", - thread_ts: d.ts, - text: `:thread: Responses about new song here please!`, - }), - headers: { - Authorization: process.env.AUTH_FOR_ZEON, - "Content-Type": "application/json", - }, - }); + // fetch("https://slack.mybot.saahild.com/send-private", { + // method: "POST", + // body: JSON.stringify({ + // channel: "C07RE4N7S4B", + // thread_ts: d.ts, + // text: `:thread: Responses about new song here please!`, + // }), + // headers: { + // Authorization: process.env.AUTH_FOR_ZEON, + // "Content-Type": "application/json", + // }, + // }); }); - if (!process.env.TESTING) { - fetch("https://slack.mybot.saahild.com/send-private", { - method: "POST", - body: JSON.stringify({ - channel: "C07RE4N7S4B", - text: ``, - }), - headers: { - Authorization: process.env.AUTH_FOR_ZEON, - "Content-Type": "application/json", - }, - }); - } + // if (!process.env.TESTING) { + // fetch("https://slack.mybot.saahild.com/send-private", { + // method: "POST", + // body: JSON.stringify({ + // channel: "C07RE4N7S4B", + // text: ``, + // }), + // headers: { + // Authorization: process.env.AUTH_FOR_ZEON, + // "Content-Type": "application/json", + // }, + // }); + // } res.redirect("/home?s=1"); }); app.get("/spotify/link", async (req, res) => {