Giter VIP home page Giter VIP logo

tmi.gd's Introduction

tmi.gd

homebrewed twitch integration for use in Godot games and applications

Why yet another twitch integration library

Gift already exists and it does a pretty good job. If you're looking to just dive into integration with your games, it's sufficient and I highly recommend just grabbing that.

Simply, the reason for this implementation is personal. I wanted to replace my overlays written in HTML/CSS+JS for OBS in Godot for fun. As such, the feature set of this integration is largely focused on one-directional consumption and tooling valueable for Streamers. This focus brought with it plenty of additional requirements that aren't suitable for Gift, and Gift's architecture isn't elegant for extending and fast iteration.

It is not recommended to use tmi.gd for creating bots that require writing message back to chat or modifying stream state with the Twitch API. This functionality is intentionally not supported out of the box.

The name of the project comes from tmi.js, which itself is named after Twitch's IRC messaging interface

What's unique about tmi.gd

  • Supports using IRC or EventSub
    • automatically uses IRC for unauthenticated sessions
    • uses EventSub when credentials are supplied
  • Chat messages are preparsed and supplied as bbcode
  • support for Animated Emotes
  • Rich profile information and images fetched for chatters through Twitch API
  • Pronouns support for profiles
  • Support for additional emotes from 7tv and BetterTTV
  • Automatic token refreshing

Requirements

  • Godot 4.x
  • magick_dumps (optional, necessary for animated emotes)

Getting Started

Tmi.gd includes a basic Scene file of a Tmi client. For applications that require only a single connection to Tmi, you may add this file as a Singleton/Autoload to your project. It will include all the features available out of the box for you.

On application startup, you may supply credentials to it however you like. A convenience function is supplied to generate credentials from your project settings.

The following settings need to be defined in your Project

application\tmi\client_id
func _ready():
  var credentials = TwitchCredentials.load_from_project_settings()

  Tmi.login(credentials)

The EventSub connection will begin automatically after authentication is successful, listening to events from the channel associated with the authenticated user.

For more rich examples of how to integrate Tmi into your Godot project, and alternative ways to initialize a client, please read the included documentation or sample project.

tmi.gd's People

Contributors

erodozer avatar morseamalgam avatar

Stargazers

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

Watchers

 avatar

tmi.gd's Issues

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.