# Getting resub length without ircv3 CAP for tags?

**URL:** <https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884>\
**Category:** Chat and IRC\
**Created:** [January 17, 2017, 2:26am UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884 "2017-01-17T02:26:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![smt](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@smt](https://staging-discuss.dev.twitch.com/u/smt)\
**Post date:** [January 17, 2017, 2:26am UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/1 "2017-01-17T02:26:48Z")

</div>

So the tags mess up my current irc library and for now I don’t wanna make my own or find another - can I get the resub length by any other means?

I can see the USERNOTICE with the resub’s message but there seems to be no date there? that kinda sucks

---

<div class="post-metadata">

**Author:** ![matt\_thomas](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/matt_thomas/32/710_2.png) [@matt\_thomas](https://staging-discuss.dev.twitch.com/u/matt_thomas)\
**Post date:** [January 17, 2017, 2:37am UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/2 "2017-01-17T02:37:33Z")

</div>

You could use the API to pull the subscription [created\_at] date time.  
[https://api.twitch.tv/kraken/channels/:CHANNEL/subscriptions/:USER](https://api.twitch.tv/kraken/channels/:CHANNEL/subscriptions/:USER)

This requires an OAuth with permission from the streamer for the scope [channel\_subscriptions]  
Or the or from each user using the scope [user\_subscriptions] (probably not preferred for obvious reasons)

Changes to payment methods and some gaps in renewal times reset this field, whereas the IRCv3 tags would continue the subscription uninterrupted.

---

<div class="post-metadata">

**Author:** ![smt](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@smt](https://staging-discuss.dev.twitch.com/u/smt)\
**Post date:** [January 17, 2017, 2:40am UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/3 "2017-01-17T02:40:37Z")

</div>

Thanks for the info, but seems like for my needs I’ll have to figure out the tags some way or another

---

<div class="post-metadata">

**Author:** ![matt\_thomas](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/matt_thomas/32/710_2.png) [@matt\_thomas](https://staging-discuss.dev.twitch.com/u/matt_thomas)\
**Post date:** [January 17, 2017, 2:53am UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/4 "2017-01-17T02:53:56Z")

</div>

Mention the library/language you are using and someone here may have some more advice

---

<div class="post-metadata">

**Author:** ![smt](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@smt](https://staging-discuss.dev.twitch.com/u/smt)\
**Post date:** [January 17, 2017, 3:22am UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/5 "2017-01-17T03:22:51Z")

</div>

> [@matt\_thomas](#):
>
> Mention the library/language you are using and someone here may have some more advice

Probably not, the community is fairly small but I’m using [Nim](http://nim-lang.org/) with this library [GitHub - dom96/irc: Nim IRC module](https://github.com/nim-lang/irc) - I’ll probably fork it and just work on adding ircv3 or at least just tag parsing working, but thanks for the help anyway

---

<div class="post-metadata">

**Author:** ![ceriath](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/ceriath/32/1547_2.png) [@ceriath](https://staging-discuss.dev.twitch.com/u/ceriath)\
**Post date:** [January 18, 2017, 4:35pm UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/6 "2017-01-18T16:35:40Z")

</div>

You could also try to parse the irc message sent from twitchnotify and split its message e.g. “xy subscribed for 7 months in a row” - just take everything between for and months. That’s what I did back then, before reading the caps.

Personally, I would still highly recommend to use those.

---

<div class="post-metadata">

**Author:** ![tduva](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/tduva/32/392_2.png) [@tduva](https://staging-discuss.dev.twitch.com/u/tduva)\
**Post date:** [January 18, 2017, 5:13pm UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/7 "2017-01-18T17:13:08Z")

</div>

Seems like he just [implemented tags support into the library](https://github.com/nim-lang/irc/pull/8). 🙂

---

<div class="post-metadata">

**Author:** ![smt](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@smt](https://staging-discuss.dev.twitch.com/u/smt)\
**Post date:** [January 18, 2017, 7:34pm UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/8 "2017-01-18T19:34:53Z")

</div>

yeah I worked out it was easier to just add it, the caps do make it a lot easier, thanks for the help anyway though guys

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [February 17, 2017, 7:35pm UTC](https://staging-discuss.dev.twitch.com/t/getting-resub-length-without-ircv3-cap-for-tags/8884/9 "2017-02-17T19:35:01Z")

</div>

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