🤖 Merge PR #46651 tmi.js: Add VIP badge to Badges interface by @timothy1205

* Add VIP badge to Badges interface.
Twitch badge list can be found at
https://help.twitch.tv/s/article/twitch-chat-badges-guide?language=en_US
Also https://dev.twitch.tv/docs/irc/tags#globaluserstate-twitch-tags under 'badges' parameter.

* Include new badge in test
This commit is contained in:
Timothy 2020-08-11 03:01:37 -06:00 committed by GitHub
parent db841e9f31
commit 9d80342901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@
// TypeScript Version: 3.3
// Twitch IRC docs: https://dev.twitch.tv/docs/irc/
// Last updated: 2019/3/06
// Last updated: 2020/8/10
import { StrictEventEmitter } from "./strict-event-emitter-types";
@ -114,6 +114,7 @@ export interface Badges {
broadcaster?: string;
global_mod?: string;
moderator?: string;
vip?: string;
subscriber?: string;
staff?: string;
turbo?: string;

View File

@ -68,7 +68,7 @@ client.connect().then(() => {
emotes.test.forEach(element => { });
}
if (badges) {
const { admin, turbo, subscriber, bits, broadcaster, global_mod, moderator, premium, staff } = badges;
const { admin, turbo, subscriber, bits, broadcaster, global_mod, moderator, premium, staff, vip } = badges;
}
userstate["display-name"];
userstate["emotes-raw"];