Git Product home page Git Product logo

notmyself / bivrost Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 6.0 3.26 MB

Bivrost is a asp.net core application that offers several overlay endpoints, hosts a Twitch.tv bot and bridges the two together to display chat events in OBS while streaming.

Home Page: https://iamnotmyself.com

License: MIT License

Shell 4.72% C# 46.98% JavaScript 19.73% HTML 1.60% Vue 24.35% Dockerfile 2.61%
asp-net-core vuejs docker now twitch twitch-bot

bivrost's Introduction

Bivrost

"In Norse mythology, Bivrost is a burning rainbow bridge that reaches between Midguard and Asgard, the realm of the gods." - WikiPedia


About

Bivrost is a asp.net core application that offers several overlay endpoints, hosts a Twitch.tv bot and bridges the two together to display chat events in OBS while streaming.

Getting Started

Running Locally

As long as you have the development dependencies installed, the application can be run on your bare metal machine.

  1. Clone the repository: git clone https://github.com/NotMyself/bivrost.git.
  2. Change directory into the cloned repository cd bivrost.
  3. Run script scripts/local-init.
  4. Run the command dotnet user-secrets set BIVROST_TWITCH_BOT_USER_NAME {bot-user-name}.
  5. Run the command dotnet user-secrets set BIVROST_TWITCH_BOT_ACCESS_TOKEN {bot-access-token}.
  6. Run the command dotnet user-secrets set BIVROST_TWITCH_BOT_CHANNEL {twitch-channel}.
  7. Run the command dotnet user-secrets set BIVROST_TWITCH_CLIENT_ID {twitch-client-id}.
  8. Run the command dotnet user-secrets set BIVROST_TWITCH_CLIENT_SECRET {twitch-client-secret}.
    • Note: You must supply valid values for the BIVROST_ environment variables, see this for instructions on how to obtain these values.
  9. Run script scripts/local-start.

Running in Docker

The application can easily be executed locally with no development dependencies using Docker.

  1. Clone the repository: git clone https://github.com/NotMyself/bivrost.git.
  2. Change directory into the cloned repository cd bivrost.
  3. Run script scripts/image-create.
  4. Run script scripts/image-start.

Obtaining Twitch Access Tokens

Bivrost uses several bits of information to connect to stream chat.

In most cases, you can use your Twitch username for both the bot username and channel. This will make the bot appear as you in chat.

If you would like to have a seperate bot username from your own, you will need to create that account on Twitch and use it to generate your access token.

You will need to generate an OAuth authorization token with several specific scopes applied to it.

  1. Navigate to Twitch Token Generator.
  2. Select the Custom Scope Token option in the popup dialog.
  3. Ensure the following scopes are enabled:
    1. user_read
    2. user_blocks_edit
    3. TODO: Figure out the exact scopes needed, for now select all.
  4. Click the Generate Token! button.
  5. You will be redirected Twitch, authenticate if needed.
  6. Click the Authorize button to grant Twitch Token Generator concent to access your account with the listed scopes.
  7. Verify you are not a robot.
  8. Click the Copy button next to Access Token.

Bivrost also makes call directly to the Twitch APIs. This requires to you to register the application to get client crendentials.

  1. Navigate to your Twitch Developer Console.
  2. Click the Register Your Application button.
  3. Add Bivrost to the Name field.
  4. Add http://example.com to the OAuth Redirect URL field.
    • Note: Bivrost does not currently use oAuth based authentication, so this value is not used.
  5. Select Application Integration from the Category dropdown.
  6. Click the Create button.
Env Var Note
BIVROST_TWITCH_BOT_USER_NAME Twitch Account Username for Bot
BIVROST_TWITCH_BOT_ACCESS_TOKEN OAuth Access Token for Twitch Account
BIVROST_TWITCH_BOT_CHANNEL Twitch Chat Channel for Bot to join and listen.
BIVROST_TWITCH_CLIENT_ID Twitch Application Client Id
BIVROST_TWITCH_CLIENT_SECRET Twitch Application Secret

Screen Shots

Bivrost On Join Message

When the bot is successfully configured, it will announce it's arrival in chat like this:

Bivrost On Join Message

Bivrost On Message Overlay

Bivrost On Message Overlay

External Dependencies

.NET Core

Node 8

Docker

Platform Dependencies

Features

Architecture

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.