Skip to content
forked from tmijs/tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv). Works with Create React App

License

Notifications You must be signed in to change notification settings

ahadcove/react-tmi

 
 

Repository files navigation

React-Tmi.js

Build Status Npm Version Downloads Issues Node Version

Works with Create React App

This version works with Create React App for production. There was a problem with the original tmi.js when it came to building that didn't work with CRA. Using this version will get rid of the issue and will work on CRA.

Website | Documentation currently at tmijs/docs | Changelog on the release page

Install

Node

npm i tmi.js
const tmi = require('tmi.js');
const client = new tmi.Client({
	options: { debug: true },
	connection: {
		reconnect: true,
		secure: true
	},
	identity: {
		username: 'bot-name',
		password: 'oauth:my-bot-token'
	},
	channels: [ 'my-channel' ]
});
client.connect();
client.on('message', (channel, tags, message, self) => {
	if(self) return;
	if(message.toLowerCase() === '!hello') {
		client.say(channel, `@${tags.username}, heya!`);
	}
});
yarn add react-tmi

Changes from forked TMI.js

Emote-sets will no longer work considering the url was sending 400 errors

Build Yourself

$ git clone https://github.com/ahadcove/react-tmi.git
$ yarn
$ yarn build

Type Definitions

yarn add -D @types/tmi.js

About

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv). Works with Create React App

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%