Socket
Socket
Sign inDemoInstall

tmi.js

Package Overview
Dependencies
11
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tmi.js

Javascript library for the Twitch Messaging Interface.


Version published
Weekly downloads
52K
decreased by-0.24%
Maintainers
1
Install size
365 kB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 18 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc