项目
在 GitHub 查看
tmijs/tmi.js
关于
💬 Twitch Messaging Interface 的 JavaScript 库。(Twitch.tv)
效率与自动化实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- 0
- 1个月
- -2
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文tmi.js

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
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
- Follow @AlcaMagic on Twitter, Alca on Twitch.
- Follow @Schmoopiie on Twitter.
- Found a bug: submit an issue.
- Discussion and help about tmi.js: Twitch API Discord Server
- For everything else: Official TwitchDev Discord Server
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.
探索相关项目
加载中…