twitch-bot icon indicating copy to clipboard operation
twitch-bot copied to clipboard

Added Whisper support

Open Hammster opened this issue 5 years ago • 6 comments

Hi there, I've added whisper support for a little project of mine. I'm not sure if this clashes with your plans for 2.0 😉

Also maybe adding some lint file would be great for contributes ;)

Hammster avatar Oct 20 '18 16:10 Hammster

After changing the test i am not 100% sure how the channel name should be named, i added a prefix just to be sure to not overlap with the actually users channel and to not have a accidental overlaps with something like #happy_grumpy which could be a separate channel even though user happy is writing to user grumpy.

Hammster avatar Oct 21 '18 01:10 Hammster

Hello there!

Thank you very much for this PR, it's a feature that's been requested several times before and I'm glad you've tackled it. I'm going to take a look at this branch and check it out, and then it will be merged in 😄

I haven't had much time over the last year to focus on this project, but I plan to become more involved again, starting with the new v2 branch. You're also right about the linting - When this project was started several years ago (then kritzbot and node-twitchbot) I was still new to Node and tools such as eslint. The new v2 branch has full linting support and is also implemented in Typescript.

The plan from here is to lock this branch after this PR, and then focus efforts on a 2.0 release. The goal is to keep the API fully backwards compatible (where possible). If you have experience with Typescript and want to help more on this project, I would welcome you raise any issues/improvements about that branch.

Thanks again 👍

kritzware avatar Oct 21 '18 13:10 kritzware

I see what you mean by deciding on what format the channel name should be in a whisper chatter. I like the idea of using the WHISPER prefix, but I think we could change the current format. Currently a channel via a whisper message looks like this:

{ channel: "[email protected]" },

Maybe it would be cleaner to remove everything after the !

{ channel: "WHISPER_bot_sender" }, // Remove the "!sender... etc."

kritzware avatar Oct 21 '18 13:10 kritzware

Maybe we should use [email protected] as a channel name instead since it is what twitch is giving us as a group-channel.

It is also possible to do do wispers by: [email protected] PRIVMSG #jtv: /w targetuser message

but i'm using the PRIVMSG #jtv :/w syntax instead since this is what the twitch staff used in most awnsers they've given on discuss.dev.twitch.tv

Otherwise to be more compliant with the name the channel could be #jtv for all wispers

Hammster avatar Oct 24 '18 11:10 Hammster

How is this feature coming along? I was about to implement this feature myself, but checked to see if someone else was working on it. And found this pull request.

Nothing since 24 Oct 2018?

Aberen avatar Mar 10 '20 13:03 Aberen

My guess is that this is still stuck between v 1.x and 2.x, you can use my branch but i have not tested this since the day i created the PR. So make sure all the deps are updated.

Hammster avatar Mar 10 '20 19:03 Hammster