DEV Community

0 seconds of 0 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
00:00
 
Michelle Duke for GitHub

Posted on • Edited on

5 1

Making a Twitch bot to connect to GitHub • Pair Programming

When you want to learn something, doing it with a friend is so much easier. A colleague is also a perfect fit. That's what myself and Bdougie did on our recent Open Source Friday live stream.

Since we both work on the Developer Relations team at GitHub, we thought this would be the perfect opportunity to learn and showcase awesome GitHub features simultaneously. Brian has been working with the GitHub API for a long time and I have been doing a lot of streaming. What better way to work together than use the GitHub API to make Twitch integrations and use them for the GitHub Twitch channel.

Twitch bot and the GitHub API

Making a Twitch bot and using the GitHub API is no trivial task. Luckily, Bdougie has been doing some work on it already. He put together an open source repo which utilises webhooks to talk to Twitch. By forking this repo and following the instructions, you can make the Twitch bot work for your channel.

GitHub logo bdougie / git-twitch

This is a service for GitHub and twitch interaction


8bit-heart-mona

git-twitch

(gif created by @pifafu)

This is a service for github and twitch to interact with each other. The use case for this git-twitch interaction between Twitch and GitHub through webhooks. If you are new to Twitch Chat interactions, you can check out my original chatbot, the beybot. In the README you will find further explanation on how Twitch interactions work.

🍴Setup for local development

1. Fork this repo (optional, open a Codespace)

The fastest way to get started is by forking this repo. PRs are welcomed if you find anything missing or unclear.

2. Start a new smee channel - https://smee.io/

smee.io is a Webhook payload delivery service. It receives payloads then sends them to your locally (development) running application. Smee is not meant to be used in production.

smee channel

In your newly forked repo, create a webhook from the repo settings that points…

This is exactly what we did on the live stream. We took it from the top and showed viewers how to fork a repo, use various editors to make changes, and then add to OBS. We showed off Codespaces, GitHub Desktop, and how to use (plus hide) secrets.

If you missed the stream you can watch the full recording:

Open Source Fridays

Does this type of content sound really cool to you? Do you like the idea of pair programming? Want to learn more about open source projects? Come along to our Open Source Friday live streams. We go live on the GitHub Twitch Channel most Fridays. Join the Meetup Group to stay up to date and see the topics each week. Join the conversation from last week's stream on our GitHub Community Forum.

See you next stream, and in the meantime: happy coding. Don't forget to fork Bdougie's repo to make your own bot and play around with some open source code.

Heroku

Deliver your unique apps, your own way.

Heroku tackles the toil — patching and upgrading, 24/7 ops and security, build systems, failovers, and more. Stay focused on building great data-driven applications.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay