Skip to content
/ tmi.js Public
forked from tmijs/tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)

License

Notifications You must be signed in to change notification settings

Lyfflyn/tmi.js

 
 

Repository files navigation

tmi.js

Build Status Npm Version Downloads Issues Node Version

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!`);
	}
});

Browser

Available as "tmi" on window.

<script src="/scripts/tmi.min.js"></script>

Prebuilt Browser Releases

Release page

Build Yourself

$ git clone https://github.com/tmijs/tmi.js.git
$ npm install
$ npm run 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.

About

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%