chats | ||
cli | ||
core | ||
events | ||
plugins | ||
utils | ||
.gitignore | ||
config.kdl | ||
main.py | ||
Pipfile | ||
Pipfile.lock | ||
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:
- Chat modules
- A websocket server
- 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