Closed kayc01 closed 7 years ago
Did you try it again? It seems to be working for me
504 http code is for gateway timeout. was your internet conection stable?
I use isMod in my 1.2 bot and it works just fine. You are getting http errors, which means this is most likely a error in reading information. Hope this helped!
Yeah twice, could it of been twitch server issues? I ran from Eclipse and my internet is 100 down, 10 up.
IsMod works right? Not sure why the error is on that line specifically.
Maybe it is looping through too many chatters, struggling to check every message if they are mod and timing out.
Opinions?
No it doesn't I tested it with my bot and it always return false
On Sun, May 14, 2017 at 3:14 PM, kayc01 notifications@github.com wrote:
Also, does the code if (!channel.isLive()) { actually work? Currently not returning anything.
Thanks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cavariux/TwitchIRC/issues/18#issuecomment-301336826, or mute the thread https://github.com/notifications/unsubscribe-auth/APmYD5O-x7tJ_RFOyeumvjaiTKlOgq0cks5r52CNgaJpZM4NaMDA .
@Squidkingdom Not correct actually, it works for me. It said the stream was live and then took a while to realise the stream had stopped and gone to host mode. I have a debug command and it shows me if the channel is live and it works fine :)
Also, update had none of these errors since. Guess it times out when trying to check every message if they are mod so put your isMod check after the message.contains or message.equalsIgnoreCase checks etc...
Huh, it won't work for me, but then again I didn't exactly spend much time on it. :P On Mon, May 15, 2017 at 4:46 AM kayc01 notifications@github.com wrote:
@Squidkingdom https://github.com/squidkingdom Not correct actually, it works for me. It said the stream was live and then took a while to realise the stream had stopped and gone to host mode. I have a debug command and it shows me if the channel is live and it works fine :)
Also, update had none of these errors since. Guess it times out when trying to check every message if they are mod so put your isMod check after the message.contains or message.equalsIgnoreCase checks etc...
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/cavariux/TwitchIRC/issues/18#issuecomment-301428057, or mute the thread https://github.com/notifications/unsubscribe-auth/APmYD5T3incQgebJlIucifrX2FjV9ilOks5r6B7YgaJpZM4NaMDA .
Quick note from my end: #isMod() works totally fine for me. The only thing beeing annoying is that the Twitch-Service providing the JSON-Objects seems to take way to long to recognize people (at least when I try something in my streams chat...). The implementation looks all fine to me as well! So I assume and hope that this has been a one-time problem :)
Error: java.io.IOException: Server returned HTTP response code: 504 for URL: http://tmi.twitch.tv/group/user/abkayckay/chatters at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) at com.cavariux.twitchirc.Chat.Channel.getMods(Channel.java:224) at com.cavariux.twitchirc.Chat.Channel.isMod(Channel.java:249) at com.cavariux.twitchirc.Chat.User.isMod(User.java:53) at me.ckay.twitchbot.CkayBot.onMessage(CkayBot.java:61) at com.cavariux.twitchirc.Core.TwitchBot.start(TwitchBot.java:308) at me.ckay.twitchbot.Main.main(Main.java:15) Exception in thread "main" java.lang.NullPointerException at com.cavariux.twitchirc.Chat.Channel.isMod(Channel.java:249) at com.cavariux.twitchirc.Chat.User.isMod(User.java:53) at me.ckay.twitchbot.CkayBot.onMessage(CkayBot.java:61) at com.cavariux.twitchirc.Core.TwitchBot.start(TwitchBot.java:308) at me.ckay.twitchbot.Main.main(Main.java:15)
Line of code: if (user.isMod(channel)) {
This is onMessage and user and channel is correct. Using v1.2
Any help is appreciated. :)