Twitch-Channel-Points-Miner icon indicating copy to clipboard operation
Twitch-Channel-Points-Miner copied to clipboard

Addition - Watchtime

Open misterkoko opened this issue 4 years ago • 11 comments

Hello!

Your script collects channel points without a hitch, but since it doesn't show you online in chat it doesn't increase your watchtime (I'm not a 100% sure that's how watchtime works).

Edit: I had your script running on a channel that has the command !watchtime enabled for an hour and my watchtime didn't increase by an hour.

Would it be possible you'd implement that you'd appear as if you're in the channels chat so it would increase the watchtime aswell as claim the points?

misterkoko avatar Nov 07 '20 22:11 misterkoko

Thanks for your idea, I'll try to research that in the future. Right now I like how the script does not increase the view count of the stream, and thus does not act as a viewbot. I guess it could be optional then...

gottagofaster236 avatar Nov 08 '20 10:11 gottagofaster236

Could maybe have two separate py scripts like main.py and main_chat.py. Your script already uses websocket and browser_cookie, so I guess you'd only need to collect the oauthToken, userID and clientID to be able to connect to chat (I think that's how it works but I could be wrong).

Thank you for taking it into consideration

misterkoko avatar Nov 08 '20 11:11 misterkoko

To join chat, you probably have to connect to Twitch IRC chat, as described in https://dev.twitch.tv/docs/irc/guide

gottagofaster236 avatar Nov 23 '20 14:11 gottagofaster236

Connecting through the SSL websocket worked for me:

SENT: PASS oauth:

SENT: NICK rastafari90

RECEIVED: :tmi.twitch.tv 001 rastafari90 :Welcome, GLHF! :tmi.twitch.tv 002 rastafari90 :Your host is tmi.twitch.tv :tmi.twitch.tv 003 rastafari90 :This server is rather new :tmi.twitch.tv 004 rastafari90 :- :tmi.twitch.tv 375 rastafari90 :- :tmi.twitch.tv 372 rastafari90 :You are in a maze of twisty passages, all alike. :tmi.twitch.tv 376 rastafari90 :>

RECEIVED: PING :tmi.twitch.tv

SENT: PONG :tmi.twitch.tv

SENT: JOIN #lvndmark

RECEIVED: :[email protected] JOIN #lvndmark

RECEIVED: :rastafari90.tmi.twitch.tv 353 rastafari90 = #lvndmark :rastafari90 :rastafari90.tmi.twitch.tv 366 rastafari90 #lvndmark :End of /NAMES list

RECEIVED: :[email protected] PRIVMSG #lvndmark :!sens

RECEIVED: :[email protected] PRIVMSG #lvndmark :@Lenblix - Tarkov - 400 dpi with 0.28 / 0.28 sensitivities (he was playing 0.45/0.45 prior)

image

So maybe the main_chat.py could connect you to the chat of the streamer you specify to get points on. Connect to the websocket, send the oauth token and nickname and the join command. And send the PONG :tmi.twitch.tv command every 5 minutes so you don't get disconnected from chat. After the streamer is offline just PART # to disconnect from chat

misterkoko avatar Nov 23 '20 19:11 misterkoko

If implemented it would be nice if this was optional

ITR13 avatar Dec 03 '20 11:12 ITR13

If implemented it would be nice if this was optional

I mentioned that in the 3rd comment: Could maybe have two separate py scripts like main.py and main_chat.py.

misterkoko avatar Dec 04 '20 13:12 misterkoko

@misterkoko There is a much easier way to do this. All you have to do is download Chatterino. It's a chat client for Twitch, and LogicalSolutions and PlagueFPS use it. I saw what channel you were trying to connect to in 3rd comment lmfao thats why I mentioned those two moderators. Nice to see a fellow Tony viewer randomly on the internet haha.

jhagin002 avatar Jan 15 '21 06:01 jhagin002

@misterkoko There is a much easier way to do this. All you have to do is download Chatterino. It's a chat client for Twitch, and LogicalSolutions and PlagueFPS use it. I saw what channel you were trying to connect to in 3rd comment lmfao thats why I mentioned those two moderators. Nice to see a fellow Tony viewer randomly on the internet haha.

lvndmaRat

For now I just have an automation when streamer X comes online it sends a SSH command to my pc to open the X streamer chat

misterkoko avatar Jan 15 '21 11:01 misterkoko

Create a nodejs script with tmi.js and join all the channels. Run that on your server. And your watchtime will increase, and you will have a higher chance of getting a gifted sub because you are in chat.

StephanBruh avatar Jan 15 '21 18:01 StephanBruh

Create a nodejs script with tmi.js and join all the channels. Run that on your server. And your watchtime will increase, and you will have a higher chance of getting a gifted sub because you are in chat.

Thank you, had no idea about this. So would this be correct?:

const tmi = require('tmi.js');

const client = new tmi.Client({ options: { debug: true }, connection: { reconnect: true }, identity: { username: 'my username', password: 'oauth: oauth token' }, channels: [ 'lvndmark' 'gamergirl' ] });

client.connect();

client.on('message', (channel, tags, message, self) => { // Ignore echoed messages. if(self) return;

if(message.toLowerCase() === '!hello') {
	// "@alca, heya!"
	client.say(channel, `@${tags.username}, heya!`);
}

});

misterkoko avatar Jan 15 '21 19:01 misterkoko

Create a nodejs script with tmi.js and join all the channels. Run that on your server. And your watchtime will increase, and you will have a higher chance of getting a gifted sub because you are in chat.

Thank you, had no idea about this. So would this be correct?:

const tmi = require('tmi.js');

const client = new tmi.Client({ options: { debug: true }, connection: { reconnect: true }, identity: { username: 'my username', password: 'oauth: oauth token' }, channels: [ 'lvndmark' 'gamergirl' ] });

client.connect();

client.on('message', (channel, tags, message, self) => { // Ignore echoed messages. if(self) return;

if(message.toLowerCase() === '!hello') {
	// "@alca, heya!"
	client.say(channel, `@${tags.username}, heya!`);
}

});

Yep that's enough! You don't need to have that !hello command, Just joining the channels is enough

StephanBruh avatar Jan 15 '21 20:01 StephanBruh