Skip to content

tmijs/tmi.js

Folders and files

NameName
Last commit message
Last commit date
Jun 26, 2022
Sep 18, 2022
Jul 5, 2022
Jul 2, 2022
Jul 4, 2022
Oct 25, 2019
Sep 18, 2022
Jun 7, 2015
Jun 21, 2022
Jul 2, 2022
Jun 21, 2022
Jun 18, 2016
Aug 11, 2021
Jul 2, 2022
Jun 21, 2022
Jul 4, 2022
Jan 8, 2023
Jul 5, 2022
Jul 5, 2022

Repository files navigation

tmi.js

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

Browser

Available as "tmi" on window.

<script src="/scripts/tmi.min.js"></script>
<script>
const client = new tmi.Client({ /* ... */ });
client.connect().catch(console.error);
</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.