Siddhart / Twitch-Discord-Bot

Discord bot that uses the Twitch API to send a message whenever a streamer goes live.
MIT License
50 stars 19 forks source link

help? #9

Closed krussedull closed 3 years ago

krussedull commented 3 years ago

C:\DiscordBots\TwitchBot>node index.js Logged in as |NLAS|Twitch#8019! C:\DiscordBots\TwitchBot\index.js:27 if (StreamData.data.length == 0) return ^

TypeError: Cannot read property 'length' of undefined at C:\DiscordBots\TwitchBot\index.js:27:29 at processTicksAndRejections (node:internal/process/task_queues:94:5)

C:\DiscordBots\TwitchBot>node index.js Logged in as |NLAS|Twitch#8019! C:\DiscordBots\TwitchBot\index.js:27 if (StreamData.data.length == 0) return ^

TypeError: Cannot read property 'length' of undefined at C:\DiscordBots\TwitchBot\index.js:27:29 at processTicksAndRejections (node:internal/process/task_queues:94:5)

Siddhart commented 3 years ago

Hey, The StreamData variable will only have a value of undefined if the given values are not correct. The "ChannelName" value in the config.json should be the name that is in the url of the streamer's twitch page (check this part). Also make sure that you assigned the correct twitch_clientID and twitch_secret. If it still didnt work let me know :D

krussedull commented 3 years ago

silly me i had put in the hole link of my user, working now, if i coude come whit one sugestion? when the stream is ended , can the status update to stream endet? and a summary if posible

Siddhart commented 3 years ago

Hmm that sounds like a good suggestion. I will see if i can add it soon.. after my exams :D