Comments (5)
methods.plan
will be "1000"
, "2000"
, "3000"
, or "Prime"
which is tier 1, 2, 3, and 1 respectively. (Twitch docs)
from tmi.js.
Here is the log of a userState
from with Tier 3:
{
'badge-info': { founder: '25' },
badges: { vip: '1', founder: '0', 'hype-train': '1' },
'client-nonce': 'REDACTED',
color: '#FF69B4',
'display-name': 'REDACTED',
emotes: null,
'first-msg': false,
flags: null,
id: 'REDACTED',
mod: false,
'reply-parent-display-name': 'REDACTED',
'reply-parent-msg-body': 'REDACTED',
'reply-parent-msg-id': 'REDACTED',
'reply-parent-user-id': 'REDACTED',
'reply-parent-user-login': 'REDACTED',
'returning-chatter': false,
'room-id': 'REDACTED',
subscriber: true,
'tmi-sent-ts': 'REDACTED',
turbo: false,
'user-id': 'REDACTED',
'user-type': null,
vip: true,
'emotes-raw': null,
'badge-info-raw': 'founder/25',
'badges-raw': 'vip/1,founder/0,hype-train/1',
username: 'REDACTED',
'message-type': 'chat'
}
from tmi.js.
This person is a founder. There's no information on if they're a tier 3 subscriber if they have the founder badge enabled. You would need to remember their tier when they send a resub message (this can be unreliable) or use the Helix API to check it at any time.
from tmi.js.
I see. So its not possible to obtain this info on a normal message. Only when subbing/resubbing or using Helix API right? 🤔
So I would have to keep a database/file of the Tier 2/3 subs and check it every message? Ok.
from tmi.js.
also: where exactly do I get "Tier 3" when they sub/resub?
for now Im gonna log this ones to see what they contain:
client.on("resub", (channel, username, months, message, userState, methods) => {
console.log("Resub: " + username);
console.log(methods.plan);
console.log(methods.planName);
console.log(methods.prime);
console.log(userState);
});
from tmi.js.
Related Issues (20)
- Emoticons dont work anymroe for long time. Fix it please? HOT 1
- Connection duplicated after disconnect and connect HOT 6
- My account was BANNED because of tmi js HOT 1
- add Hype Train event and channel point event PLEASEEE HOT 1
- Can't connect to server with OAuth token authorization HOT 2
- Wrong message ID for messages sent from client HOT 4
- Cannot read properties of undefined (reading 'startsWith') in Commands.js of tmi.js HOT 1
- Type errors
- Create and get poll results HOT 1
- Client auto-joins channels after reconnect
- help
- client.on('redeem', ....) doesn't listen for reward redemption without viewer message HOT 1
- Did number of subs get removed from giftsub?
- Properties with type T | undefined can be null
- Missing userstate in type definitions of ban and timeout events HOT 1
- Unrecognized command: /ban HOT 7
- In `client.on('redeem',......` , Is there a way to obtain the message was sent in that reward? HOT 1
- Missing Component HOT 1
- periodic error log HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmi.js.