1.7.1 • Published 3 years ago

react-tmi v1.7.1

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

React-Tmi.js

Test Workflow Status Npm Version Downloads Issues Node Version

npm.io

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, messagesLogLevel: "info" },
	connection: {
		reconnect: true,
		secure: true
	},
	identity: {
		username: 'bot-name',
		password: 'oauth:my-bot-token'
	},
	channels: [ 'my-channel' ]
});
client.connect().catch(console.error);
client.on('message', (channel, tags, message, self) => {
	if(self) return;
	if(message.toLowerCase() === '!hello') {
		client.say(channel, `@${tags.username}, heya!`);
	}
});
$ npm i 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
$ cd ./react-tmi
$ npm install
$ npm build

Type Definitions

$ npm i -D @types/tmi.js

Community

Contributors

Thanks to all of the tmi.js contributors!

Contributing guidelines

Please review the guidelines for contributing of the tmi.js repository. We reserve the right to refuse a Pull Request if it does not meet the requirements.