# Find Chatter Info with tmi.js

**URL:** <https://discuss.dev.twitch.com/t/find-chatter-info-with-tmi-js/26584>\
**Category:** API\
**Created:** [June 20, 2020, 12:29am UTC](https://discuss.dev.twitch.com/t/find-chatter-info-with-tmi-js/26584 "2020-06-20T00:29:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RyanBuech](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/ryanbuech/32/8891_2.png) [@RyanBuech](https://discuss.dev.twitch.com/u/RyanBuech)\
**Post date:** [June 20, 2020, 12:29am UTC](https://discuss.dev.twitch.com/t/find-chatter-info-with-tmi-js/26584/1 "2020-06-20T00:29:42Z")

</div>

I currently have a bot using tmi that reads chat messages and what user sent them. When a message comes in it saves some user info in a json called context. It has things like: `{ 'badge-info': 'subscriber/34', badges: { broadcaster: '1', subscriber: '12' }, 'client-nonce': '', color: '', 'display-name': 'rudeoff', emotes: null, flags: null, id: '', mod: false, 'room-id': '', subscriber: true, 'tmi-sent-ts': '', turbo: false, 'user-id': '', 'user-type': null, 'emotes-raw': null, 'badges-raw': '', username: 'rudeoff', 'message-type': 'chat' }`

Was just wondering how I should take this info and try to find how long the chatter has been following the channel. Will I need to do a fetch with their user id?

---

<div class="post-metadata">

**Author:** ![Dist](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://discuss.dev.twitch.com/u/Dist)\
**Post date:** [June 20, 2020, 7:01am UTC](https://discuss.dev.twitch.com/t/find-chatter-info-with-tmi-js/26584/2 "2020-06-20T07:01:08Z")

</div>

You need to use the Get User Follows endpoint: [https://dev.twitch.tv/docs/api/reference#get-users-follows](https://dev.twitch.tv/docs/api/reference#get-users-follows)

Make a request with the `to_id` param being the channel that the user is chatting it, and the `from_id` being the users id, and the results will include a timestamp of when they followed.

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [July 20, 2020, 7:01am UTC](https://discuss.dev.twitch.com/t/find-chatter-info-with-tmi-js/26584/3 "2020-07-20T07:01:11Z")

</div>

Closed on July 20, 2020, 7:01am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
