Skip to content

An AWS Lambda function connecting Twitch and Discord Webhooks

License

Notifications You must be signed in to change notification settings

dylmye/twitch-golive-discord

Repository files navigation

Twitch-Discord Live Notifications

A rudimentary AWS lambda function for notifying your discord server when you're live on Twitch

DeepSource CodeQL

This lambda function acts as a webhook reciever for Twitch's EventSub API. Full instructions for usage will be in a blog post soon.

Requirements

  • Python 3.x (Tested on AWS 3.7, AWS 3.8 and Windows 3.9.1)
  • Internet connection

Install

To install dependencies in a manner ready for sending to AWS, run the following:

$ pip install --target . -r requirements.txt

Usage

This function is intended to run on AWS Lambda. See the blog post for more information. Make sure to make a copy of env.example.py, rename it to env.py and fill out the required values:

  • DISCORD_WEBHOOK_URL: the URL Discord provides for its channel webhook
  • DISCORD_ROLE_ID: the ID of the role to @ in your message. Set this to 'everyone' if you want to @ everyone
  • TWITCH_USERNAME: the twitch username to promote

Credits