Hyphen-ated / DJBot

twitch songrequest irc bot
GNU General Public License v2.0
18 stars 9 forks source link

Issues detecting people as mods. #34

Closed powerade661 closed 9 years ago

powerade661 commented 9 years ago

I am thinking this is due to the new CAP authentication for Twitch but it doesn't detect any other mods as moderators when trying to change the volume or skip songs.

Regards, Powerade661

Escheria commented 9 years ago

To enable JOIN/PART messages you need to request the membership feature, according to http://discuss.dev.twitch.tv/t/join-part-changes-temporary-and-future/2519.

So a possible fix is to send a raw message with the CAP request (CAP REQ :twitch.tv/membership) before the bot attempts to join the chosen channel.

powerade661 commented 9 years ago

Yes I understand that, but where would I put the CAP commands? There isn't a server window to just plug in the commands.

Escheria commented 9 years ago

Try inserting this this.sendRawLine("CAP REQ :twitch.tv/membership"); after the following line: https://github.com/Hyphen-ated/DJBot/blob/master/src/main/java/hyphenated/djbot/DjIrcBot.java#L68

I've not tried this yet cause my copy of DJ Bot is having issues parsing the options >_< So I kind of hope you can test this :/

powerade661 commented 9 years ago

It's not working, or at least I don't think. I just tested it and mods still can't skip songs. Let me show you what I have for my bot that seems to work fine when detecting mods. /raw CAP REQ :twitch.tv/membership /raw CAP REQ :twitch.tv/commands

Escheria commented 9 years ago

I assume you have tried sending both requests too... Maybe try 'sendRawLineViaQueue' method instead of 'sendRawLine'? (btw: http://www.jibble.org/javadocs/pircbot/org/jibble/pircbot/PircBot.html)

If that doesn't help then we might need Hyphen's help here.

powerade661 commented 9 years ago

No it's not working and yes I tried both along with sendRawLineViaQueue :(

Escheria commented 9 years ago

I'm out of ideas for now :(

powerade661 commented 9 years ago

The sendRawLineViaQueue actually rendered the code useless.

Escheria commented 9 years ago

OK, I got my DJ Bot copy finally working.

The application log says the following: INFO [2015-06-26 22:47:54,711] hyphenated.djbot: Moderator priviliges added for escheria INFO [2015-06-26 22:47:54,711] hyphenated.djbot: Moderator priviliges added for eschbot

So as a matter of fact, I just managed to change the volume and skip songs using my bot account. All I added is this.sendRawLine("CAP REQ :twitch.tv/membership");. I'm using version 0.1.9 and not 0.2.0 though.

On my first build after the edit, it would change the volume but not skip the songs, but after a restart I could both change volume and skip songs. Try starting your DJ Bot once again and see the console if the moderator privileges are added o.o

EDIT: freshly downloaded DjBot 0.2.0 wont load >_>;

powerade661 commented 9 years ago

Ok thanks. Lol

powerade661 commented 9 years ago

What are you thoughts on this Hyphen?

Hyphen-ated commented 9 years ago

Looks like you guys figured it out, I'll test that line escheria posted sometime

powerade661 commented 9 years ago

It doesn't work in 0.2.0 just in 0.1.9

Hyphen-ated commented 9 years ago

works fine in 0.2.0 once the other 0.2.0 bug is fixed. thanks for figuring it out for me.