GithubHelp home page GithubHelp logo

Comments (5)

AlcaDesign avatar AlcaDesign commented on June 3, 2024 1

methods.plan will be "1000", "2000", "3000", or "Prime" which is tier 1, 2, 3, and 1 respectively. (Twitch docs)

from tmi.js.

rodrigograca31 avatar rodrigograca31 commented on June 3, 2024

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.

AlcaDesign avatar AlcaDesign commented on June 3, 2024

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.

rodrigograca31 avatar rodrigograca31 commented on June 3, 2024

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.

rodrigograca31 avatar rodrigograca31 commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.