Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitch Chat integration

Scripts to integrate Twitch Chat into Openplanet scripts.

This repository also includes an example plugin for displaying the Twitch Chat in-game in the overlay.

Usage

Put the scripts somewhere in C:\Users\Username\Openplanet4\Scripts\ so that you can #include them. Here's a quick example:

#include "TwitchChat.as"

class ChatCallbacks : Twitch::ICallbacks
{
	void OnMessage(IRC::Message@ msg)
	{
		// ...
	}

	void OnUserNotice(IRC::Message@ msg)
	{
		// ...
	}
}

void Main()
{
	print("Connecting to Twitch chat...");

	auto callbacks = ChatCallbacks();
	if (!Twitch::Connect(callbacks)) {
		return;
	}

	print("Connected to Twitch chat!");

	Twitch::Login(
		Setting_TwitchToken,
		Setting_TwitchNickname,
		Setting_TwitchChannel
	);

	while (true) {
		Twitch::Update();
		yield();
	}
}

About

Twithch integration scripts for Openplanet.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages