Giter Site home page Giter Site logo

marcdonald / twitch-spotify-request-bot Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 23.0 688 KB

This is a bot that listens to the chat of a given Twitch stream for messages with a Spotify song link in them and then adds that song to a playlist and/or your queue.

Home Page: https://www.marcdonald.com

License: MIT License

TypeScript 93.27% Shell 5.84% JavaScript 0.89%
hacktoberfest livestream song songs spotify spotify-api spotify-playlist spotify-web-api twitch twitch-bot twitch-tv twitchtv

twitch-spotify-request-bot's People

Contributors

colorful98 avatar deepsourcebot avatar dependabot[bot] avatar itsrumo avatar ivangodinez21 avatar marcdonald avatar trithir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

twitch-spotify-request-bot's Issues

Bot response in twitch-chat

Would it be possible to make the bot respond in the chat using a defined twitch account?

For example my twitch is: abcd
And a second twitch account for the bot would be: abcd_bot (ofc the streamer would need to set this up on their own)

I understand that this adds another layer of complexity to the bot as it has to be authorized to twitch aswell as spotify! But it would be amazing to get some form of response for the viewers attempting to "request" songs to be played on stream ๐Ÿ‘

Basically, when the bot detects the command (i use !spotify as prefix) it responds in chat with something like this:

Success: "Song XYZ was added to the playlist"
Fail (already in playlist): "Song XYZ is already in the playlist"
Fail (no link): "No spotify link detected"

I'm facing the issue that the people using the command are confused regarding if the song was actually added to the playlist or not, since the playlist isn't available to everyone ๐Ÿ‘

Kind Regards,
Colorful

Heroku Deploy Erroring After Several Minutes

When the app is deployed out to Heroku, it works fine for a while, but then shuts down seemingly randomly after a few minutes. This occurs when the app is left idle AND when the app is in constant use. Issue first identified by ssbPleb on Twitter and I can recreate it on my own Heroku account with a fresh app created.

This is an example of the logs when the error occurs.
Example of logs that print when the error occurs

When Heroku restarts the app, there seems to be two instances which work in parallel for a short amount of time, resulting in messages being processed twice.

Messages being processed twice

After a minute or so Heroku fully shuts down both of the instances.

Error logs when Heroku shuts down the instances

Heroku on the free tier does shut down instances after 30 minutes of sitting idle, however this error occurs after only a few minutes and even occurs when the instance is not idle.

Procfile wrong declarations

I forgot to add worker type to the Procfile

โŒ

npm start

โœ”

worker npm start

This could be added at any time, it doesn't affect the deploy, it just add an option to prevent app sleeping using free dyno hours. This let the app runs 24/7 (depends on the remaining dyno hours) if the user turn on worker npm start instead of turning on web npm start (that only works for 1 hour and then go to sleep).

Currently, is only available web npm start (the other one doesn't work until Procfile be updated)

Inked120200829-62430700-c1ea-11eb-93bc-8bbdffa726fd_LI

Need Help

When it come to this, i will say that im a noob. Having several issues trying to set this up. Anyone available to help with step by step instructions. I have went to two different people and ive had no luck

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.