mirror of
https://github.com/SrIzan10/vinci.git
synced 2026-07-05 06:49:43 +00:00
fix: catch errors
This commit is contained in:
2
index.ts
2
index.ts
@@ -62,7 +62,7 @@ Notifier.addNotifier(youtube_channel_id, discord_channel_id);
|
||||
// client.on('messageCreate', (message: Message) => {})
|
||||
|
||||
async function nowPlayingRadio() {
|
||||
const getAPI = await axios.get("https://opml.radiotime.com/Describe.ashx?id=s67006").then((res) => res.data)
|
||||
const getAPI = await axios.get("https://opml.radiotime.com/Describe.ashx?id=s67006", {validateStatus: function (status) {return status === 200|| status === 403}}).then((res) => res.data).catch((err) => {console.log("now playing radio errored out? diesofcringe")})
|
||||
var parser = new DOMParser()
|
||||
var XMLDoc = parser.parseFromString(getAPI, "text/xml");
|
||||
let getsong, getartist;
|
||||
|
||||
Reference in New Issue
Block a user