Multi-threaded, multi-platform, UI-agnostic, plugin-powered chat interaction powerhouse~
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Derek 9937951e69 Minor cleanup 2 months ago
ovtk_audiencekit Minor cleanup 2 months ago
.gitignore Ignore logs (if ya keep em) 5 months ago
Pipfile [Core] Plugin Webserver + asyncio event loop 2 months ago
Pipfile.lock [Core] Plugin Webserver + asyncio event loop 2 months ago
README.md Normalize arg handling across command and trigger 6 months ago
config.kdl [Core] Allow config splitting! 3 months ago
main.py Reorganize 3 months ago

README.md

Open Vtuber Tool Kit - Audience Interaction module

This is the project that handles audience interaction within OVTK, but is designed to be very useful standalone and in co-ordination with non-OVTK tools.

It consists of three parts:

  1. Chat modules
  2. A websocket server
  3. A powerful, easy to use plugin system

Chat Modules

As OVTK is designed to be platform-agnostic, both in terms of the host OS and the streaming platform, the job of the chat modules is to fetch and normalize audience events (chats, donations, etc).

Each runs in its own process, and so can be written with little concern for the rest of the application to ease development requirements.

Websocket Server

The websocket server publishes all events to any external clients that may be interested - ex, other OVTK software.

Plugin system

As this system sits directly between the streamer and the streaming service (which sits between the audience), it is a very handy place to be able to place custom logic or bots!

The system is highly capable out-of-the-box, allowing you to write simple automation via a straightforward config syntax called KDL. For example, a bot that replies to raid events would look like:

trigger event="Raid" {
  reply (arg)"Thank you very much for the {event.user_count} raid, {event.from_channel}!"
}

And writing your own plugin to extend the abilities available to you (or to implement complex logic) is just as straightforward. Here's an example of a plugin that automatically changes "simp" to "shrimp" in every message (as seen by those consuming the websocket output):

from plugins import PluginBase
from events import Message

class Plugin(PluginBase):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

    def on_bus_event(self, event):
      if isinstance(event, Message):
          event.text.replace('simp', 'shrimp')
      return event