quer/the-steam-awards

Voting for games from my list

Magellano opened this issue · 6 comments

Hello, quer!

I see that the code has changed. How do I now add games from my voting list to steamAwardNominateGame_v2 ?
The code that worked last year is not voting now

quer commented

the part of the code that change, is where i find the games that the account own, as now some of the games cant be nominated. like csgo. so now it will loop through all the own games, and look up if can be voted. So maby the part where i find a game to nominate. do not work, as the account do not have a game that cant be nominated.

else can you provide, what i have done ?

the part of the code that change, is where i find the games that the account own, as now some of the games cant be nominated. like csgo. so now it will loop through all the own games, and look up if can be voted. So maby the part where i find a game to nominate. do not work, as the account do not have a game that cant be nominated.

else can you provide, what i have done ?

Okay.
Last year, the code voted for the games I needed. Here is the part of the code where I specified the appid
How now to implement the same in the current vote? By the way, I didn't use the api in the last vote

 	seeIfHaveAll(_requestStore, sessionID, function () {
		//GetMostPlayedGame(_requestCommunity, steamClient.steamID, function (appid) { //OBS the game must have played over 5 min. 
		var appid = {appid: 643870 }
			console.log(appid);
			vote("50", 592610 , _requestStore, sessionID, function () {
				vote ("51", 592610 , _requestStore, sessionID, function (){
					vote ("52", 592610 , _requestStore, sessionID, function (){
						vote ("53", 1369340 , _requestStore, sessionID, function (){
							vote ("54", 1420540 , _requestStore, sessionID, function (){
								vote ("55", 1338520 , _requestStore, sessionID, function (){
									vote ("56", 1150950 , _requestStore, sessionID, function (){
										vote ("57", 1114630 , _requestStore, sessionID, function (){
											vote ("58", 1219700 , _requestStore, sessionID, function (){
												vote ("59", 1338780 , _requestStore, sessionID, function (){
													options.steamUser.gamesPlayed([{ game_id: appid.appid }]);
				//Info wee remove the Review 
quer commented

the now module was updated in 2019, as you can see the oldest commit here, is where it was added.
https://github.com/quer/the-steam-awards/commits/master/modules/events/steamAwardNominateGame_v2.js

i think the one you want, is the version 1. The module called "steamAwardNominateGame.js" ( whitout _v2) it look like that you using above. it shoud still work, you just have to replace the app id by your self.

the now module was updated in 2019, as you can see the oldest commit here, is where it was added. https://github.com/quer/the-steam-awards/commits/master/modules/events/steamAwardNominateGame_v2.js

i think the one you want, is the version 1. The module called "steamAwardNominateGame.js" ( whitout _v2) it look like that you using above. it shoud still work, you just have to replace the app id by your self.

It's all very strange. In voting in 2020, I used the code I wrote above and it worked.

In addition, steamAwardNominateGame.js is also not working right now. The script runs, reports that everything is successful, but nothing changes on the voting page

quer commented

if you choose to use the old script. you have to do a bit more work on your end.
you have to manuel tell what category it shoud vote for what app

Each line vote("50", 592610 , _requestStore, sessionID, function () { is a vote. Where in this exsample, the 50 is the category. and the 592610 is the app it will nominate.

you have to vote for each category, this event it is from 61 - 70. and remeber you can only use valid appid, for each category. that why i can only recommend using the _v2, as it take care of all that.

if you choose to use the old script. you have to do a bit more work on your end. you have to manuel tell what category it shoud vote for what app

Each line vote("50", 592610 , _requestStore, sessionID, function () { is a vote. Where in this exsample, the 50 is the category. and the 592610 is the app it will nominate.

you have to vote for each category, this event it is from 61 - 70. and remeber you can only use valid appid, for each category. that why i can only recommend using the _v2, as it take care of all that.

I set up the code for myself - it successfully coped with my requirements.
By the way, the first version of the module (without _v2) - it does not work now. The last update of this module was 2 years ago.

Perhaps it will be useful to someone. Instead of your game appid in the values of vote('61'-'70' insert the appid of the game you want to vote for. In the remaining lines, insert the appid you need to play and write a review - use the search.

var cheerio = require('cheerio');
var apiKey = null; 
var MasterKey = "xxxx"; // will be used if changed. will be used if, it did not find a key. on the account running. 
var vrsupportKey = "62";
var IdToSelfVoteOn = "63";
var idleGameTime = 5 // 5 min
module.exports = async function(steamClient, _requestCommunity, _requestStore, sessionID, options, callback){
	// if(apiKey == null){
		// apiKey = await GetSteamApiKey(_requestCommunity);
	// }
	// if(apiKey == null && MasterKey != "xxxx"){
		// apiKey = MasterKey;
	// }
	// if(apiKey == null){
		// console.log(options.accountPretty + " was not able to get apiKey, will be skipped")
		// callback();
		// return;
	// }
	usedApps = [];
	//skip account if all is unlocked.
	if(await IsAccountDone(_requestStore)){
		console.log(options.accountPretty + "is already done, and have the badge, will be skipped");
		callback();
		return;
	}
	seeIfHaveAll(_requestStore, sessionID, function () {
		//GetMostPlayedGame(_requestCommunity, _requestStore, steamClient.steamID, options, function (appid) { //OBS the game must have played over 5 min. 
			console.log(your game appid); // Add the appid of the game you want to play
			vote("61", your game appid, _requestStore, sessionID, function () {
			vote("62", your game appid, _requestStore, sessionID, function () {
			vote("63", your game appid, _requestStore, sessionID, function () {
			vote("64", your game appid, _requestStore, sessionID, function () {
			vote("65", your game appid, _requestStore, sessionID, function () {
			vote("66", your game appid, _requestStore, sessionID, function () {
			vote("67", your game appid, _requestStore, sessionID, function () {
			vote("68", your game appid, _requestStore, sessionID, function () {
			vote("69", your game appid, _requestStore, sessionID, function () {
			vote("70", your game appid, _requestStore, sessionID, function () {
				options.steamUser.gamesPlayed([{ game_id: 643870 }]);		
				//Info wee remove the Review 
				removeMake(_requestCommunity, _requestStore, sessionID, steamClient.steamID, your game appid , function () { 
					setTimeout( function () { // we need 5 min to make steam register the have been played, and at least 5 min game total game time, to be able to create a review
						options.steamUser.gamesPlayed([]);					
						Make(_requestCommunity, _requestStore, sessionID, steamClient.steamID, your game appid, async function () {
							try {
								await EnsureWeAreDone(_requestStore, options);
								console.log("done");
								callback();
								return;
							} catch (error) {
								module.exports(steamClient, _requestCommunity, _requestStore, sessionID, options, callback);// if not all did go as we expected we rerun. there is build a save ind so we only nomination missing.
							}
							
						});
					}, 10000 * idleGameTime);// I reduced it to 10 seconds because I have more than 2 hours in the game
				})
			})
			})
			})
			})
			})
			})
			})
			})
			})
			})
		//})
	});

};