NightDev Community Forums

!howlong has suddenly stop working!


#1

Hello there!

I’m a mod for “REASTEN” and we have a problem with the !howlong command.

A couple of days ago, the !howlong stopped working. As soon as someone typed !howlong in chat it said that they worren’t following. Example: “Joelkw Has Been Following reasten on Twitch for: Joelkw is not following.”

Also, a couple of days ago, Nightbot stopped complety to work. None of the commands didn’t work for a couple hours. I don’t remember if it was then the !howlong command stopped working but I guess it can have something to with it?

I deleted !howlong and created a new one, both !howlong and !followage, but none of them works. Just says the same think “user is not following” (see pictures down below).

!howlong: https://gyazo.com/f9debd91679f613e0f5f234e5a830e1f

!followage: https://gyazo.com/757559f3b2b571c70a39772921373855

Anyone know what to do?


Help me commands Nightbot
#2

Heya, this probably has to do with a recent update from Twitch where 3rd party sites need to authenticate their service before they can access the needed data (Info here).
I dont know who made the !howlong command, but the creator of !followage was notified earlier today, so that one will probably be fixed soon.

If you want, you can also use my followlength script:
!commands add !followsince $(urlfetch https://2g.be/twitch/following.php?user=$(touser)&channel=$(channel))

I don’t know which format you used, this onces default is for example: X is following Y since: 15-09-2014 14:40:36.
You can add &format=days at the end of the link to get: X has been following Y for 731 days.
Or &format=daysint to just get the number of days following.
If you need an other date format, let me know.

Edit:
Current formats:

  • &format= (X is following Y since: 15-09-2014 14:40:36) (default)
  • &format=days (X has been following Y for 731 days)
  • &format=daysint (731)
  • &format=months (X has been following Y for 24 months)
  • &format=monthsint (24)
  • &format=ymwdhis(X has been following Y for 1 year, 10 months, 3 weeks, 3 days, 21 hours, 25 minutes, 14 seconds)
  • &format=ymwd(X has been following Y for 1 year, 10 months, 3 weeks, 3 days)
  • &format=mdygia (X has been following Y since 01-31-2005, 5:55 PM)
  • &format=datewd (X has been following Y since 2014-09-15 (105 Weeks, 1 Day))
  • &format=monthday (X has been following Y for 32 months, 30 days)

Or use the PHP date format:
For example: &format=Y-m-d (H:i:s), will return: X has been following Y since 14-09-15 (01:40:36).
If you dont want the leading text, use &format=Y-m-d&notext, which will return: 14-09-15.

Edit:
Default timezone is UTC, if you want a different timezone use the timezone parameter for example:
...&format=d-m-Y H:i:s&timezone=America/New_York

Supported timezones here.


!followage command
Followage format
Nightbot Follow Check
Useful Custom APIs
Teak’s !HowLong Following Nightbot Command
Not repsonding to !followage
Twitch, how can I create a command
#3

What about in months?
Tried a few things, but didn’t work…


#4

Hey, I justed added 2 formats for months, is this what you mean?
&format=months --> X has been following Y for 24 months.
&format=monthsint --> 24


#5

Exactly what I meant, cheers mate!
But what if you could make it like you did with the other, so you could see months, weeks, days, hours and so on?


#6

Then I think this should be the one you need:
&format=mwdhms
X has been following Y for 1 year, 10 months, 3 weeks, 3 days, 21 hours, 25 minutes, 14 seconds


#7

Saved my day, thanks mate!


#8

can you copy and paste the command where it responds with year, months, I’m having a hard time adding it to the command


#9

Simply copy and paste this

!commands add !followsince $(urlfetch https://2g.be/twitch/following.php?user=$(touser)&channel=$(channel)&format=mwdhms)

Followage no longer works?
Following command
How to do a followage command
#10

Hey there, could you please add an option to show the date in the standard American notation? (E.G. Lucwousin has been following since 01-31-2005, 5:55 PM) I’d appreciate it!

Thanks in advance or something like that.


#11

This should be the one you are looking for: &format=mdygia


#12

thank you <3 so much <3


#13

Nice work. Have you thought about making it so instead of you having to write up defaults for each format, to allow people to put in (sort of like how you would write a format parameter string into just say a PHP date())? That would give more flexibility to the user.

The defaults you have there are good, but I think a format would be good would be something like (1 year, 3 months 16 days) which could possibly be achieved by if you had format=ymd, and of course if the years = 0, it would show just 3 months, 16 days.

just a thought. But again, nice work.


#14

Yup, I agree thats a good addition. The formats in my first post are still available, but if you want a custom date format you can use the date parameters as shown here: PHP date.

For example: &format=Y-m-d (H:i:s), will return: X has been following Y since 14-09-15 (01:40:36).
If you dont want the leading text, use &format=Y-m-d&notext, which will return: 14-09-15.


#15

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