Jump to content
McKay Development

Mr_wall1122

Member
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Interests
    coding, gaming and learning more languages

Mr_wall1122's Achievements

  1. hello i am having a weird issue when i login in for the first time using email authentication my "loggedOn" function gets called twice, but if i was to login again with the same details it would be back to normal, and it works normally if i was to sign in using my account with mobile authentication, any suggestions please help my full code is: const TradeOfferManager = require('steam-tradeoffer-manager'); const SteamCommunity = require('steamcommunity'); const SteamUser = require('steam-user'); var colors = require('colors/safe'); let date = require('date-and-time'); var prompt = require('prompt'); const chalk = require('chalk'); var sleep = require('sleep'); require('console-stamp')(console, '[HH:MM:ss]'); const RedStyle = chalk.red; const YellowStyle = chalk.yellow; const GreenStyle = chalk.green; const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager ({ steam: client, community: community, language: 'en' }); //Welcome MESSAGE! console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' Welcome To My Group Invite Blocker ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' ')); console.log(YellowStyle('-------------------------------------------')); console.log(YellowStyle(' Made By Ben Wall ')); console.log(YellowStyle('-------------------------------------------')); console.log(YellowStyle(' ')); console.log(RedStyle('-------------------------------------------')); console.log(RedStyle('NOTE: IF YOU LOGIN USING STEAM EMAIL ')); console.log(RedStyle('AUTHENTICATOR ENTER THE CODE AND THEN ')); console.log(RedStyle('SIMPLY RESTART AND RE-LOGIN TO THE BOT ')); console.log(RedStyle('DUE TO A UNKNOWN PROBLEM THAT IM WORKING ')); console.log(RedStyle('ON, NOW YOU WONT NEED THE CODE AS IT ONLY ')); console.log(RedStyle('REQUIRES CODE UPON FIRST LOGIN, IF YOU USE ')); console.log(RedStyle('MOBILE TO AUTHENTICATE THEN YOU ARE FINE TO')); console.log(RedStyle('USE IT AS INTENDED, JUST MORE STEPS FOR THE')); console.log(RedStyle('EMAIL AUTHENTICATOR GUYS ')); console.log(RedStyle('-------------------------------------------')); var schema = { properties: { Account_Name: { description: colors.green('Account Name'), }, Password: { description: GreenStyle('Password'), hidden: true, replace: '*' }, } }; prompt.start(); prompt.get(schema, function (err, result) { const logOnOptions = { accountName: result.Account_Name, password: result.Password }; //logon using credentials that you typed in client.logOn(logOnOptions); client.setOption("promptSteamGuardCode", false); client.setOption("autoRelogin", true); var mobile = { properties: { Steam: { description: GreenStyle('Steam Mobile Code') }, } }; var email = { properties: { SteamE: { description: GreenStyle('Steam Email Code (PLEASE RESTART BOT AFTER)') }, } }; //Checks if you are using Mobile authenticator or email Code client.on('steamGuard', function(domain, callback) { if(domain == null){ prompt.start(); prompt.get(mobile, function (err, result) { var code = result.Steam; callback(code); }); }else{ prompt.start(); prompt.get(email, function (err, result) { var code = result.SteamE; callback(code); }); } }); }); let now = new Date(); //this is what happens when succesfully logged on client.on('loggedOn', () => { client.on("accountInfo", function(name, country) { console.log(GreenStyle(' ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle('Group Invite Blocker 3000 ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle("Your Country: " + country)); console.log(GreenStyle('The Time Upon Logon: ' + date.format(now, 'HH:mm:ss'))); console.log(GreenStyle('Succesfully logged in as: ' + name)); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' ')); client.setPersona(SteamUser.Steam.EPersonaState.Online); }); }); //READ THIS: IMPORTANT //IF YOU DO NOT HAVE FAMILY PIN ENABLED DELETE THE NUMBERS //EXAMPLE: //WITHOUT FAMILY VIEW PIN: //manager.setCookies(cookies); //community.setCookies(cookies); //WITH FAMILY VIEW PIN: //manager.setCookies(cookies, 1234); //community.setCookies(cookies, 1234); client.on('webSession', function(sessionID, cookies) { console.log(GreenStyle("Got Web Session! (this is good)")); manager.setCookies(cookies, 4265); community.setCookies(cookies, 4265); }); //This is the code which blocks group invites automatically client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ client.respondToGroupInvite(steamID, false); console.log("Declined Steam Group Invite"); } });
  2. yeah i firgured that one out , but when i login for the first time using email authenticator it calls my "loggedOn" event twice but i dont know why, as you can see im using the exact same details.... my current code is: const TradeOfferManager = require('steam-tradeoffer-manager'); const SteamCommunity = require('steamcommunity'); const SteamUser = require('steam-user'); var colors = require('colors/safe'); let date = require('date-and-time'); var prompt = require('prompt'); const chalk = require('chalk'); var sleep = require('sleep'); require('console-stamp')(console, '[HH:MM:ss]'); const RedStyle = chalk.red; const YellowStyle = chalk.yellow; const GreenStyle = chalk.green; const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager ({ steam: client, community: community, language: 'en' }); //Welcome MESSAGE! console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' Welcome To My Group Invite Blocker ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' ')); console.log(YellowStyle('-------------------------------------------')); console.log(YellowStyle(' Made By Ben Wall ')); console.log(YellowStyle('-------------------------------------------')); console.log(YellowStyle(' ')); console.log(RedStyle('-------------------------------------------')); console.log(RedStyle('NOTE: IF YOU LOGIN USING STEAM EMAIL ')); console.log(RedStyle('AUTHENTICATOR ENTER THE CODE AND THEN ')); console.log(RedStyle('SIMPLY RESTART AND RE-LOGIN TO THE BOT ')); console.log(RedStyle('DUE TO A UNKNOWN PROBLEM THAT IM WORKING ')); console.log(RedStyle('ON, NOW YOU WONT NEED THE CODE AS IT ONLY ')); console.log(RedStyle('REQUIRES CODE UPON FIRST LOGIN, IF YOU USE ')); console.log(RedStyle('MOBILE TO AUTHENTICATE THEN YOU ARE FINE TO')); console.log(RedStyle('USE IT AS INTENDED, JUST MORE STEPS FOR THE')); console.log(RedStyle('EMAIL AUTHENTICATOR GUYS ')); console.log(RedStyle('-------------------------------------------')); var schema = { properties: { Account_Name: { description: colors.green('Account Name'), }, Password: { description: GreenStyle('Password'), hidden: true, replace: '*' }, } }; prompt.start(); prompt.get(schema, function (err, result) { const logOnOptions = { accountName: result.Account_Name, password: result.Password }; //logon using credentials that you typed in client.logOn(logOnOptions); client.setOption("promptSteamGuardCode", false); client.setOption("autoRelogin", true); var mobile = { properties: { Steam: { description: GreenStyle('Steam Mobile Code') }, } }; var email = { properties: { SteamE: { description: GreenStyle('Steam Email Code (PLEASE RESTART BOT AFTER)') }, } }; //Checks if you are using Mobile authenticator or email Code client.on('steamGuard', function(domain, callback) { if(domain == null){ prompt.start(); prompt.get(mobile, function (err, result) { var code = result.Steam; callback(code); }); }else{ prompt.start(); prompt.get(email, function (err, result) { var code = result.SteamE; callback(code); }); } }); }); let now = new Date(); //this is what happens when succesfully logged on client.on('loggedOn', () => { client.on("accountInfo", function(name, country) { console.log(GreenStyle(' ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle('Group Invite Blocker 3000 ')); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle("Your Country: " + country)); console.log(GreenStyle('The Time Upon Logon: ' + date.format(now, 'HH:mm:ss'))); console.log(GreenStyle('Succesfully logged in as: ' + name)); console.log(GreenStyle('-------------------------------------------')); console.log(GreenStyle(' ')); client.setPersona(SteamUser.Steam.EPersonaState.Online); }); }); //READ THIS: IMPORTANT //IF YOU DO NOT HAVE FAMILY PIN ENABLED DELETE THE NUMBERS //EXAMPLE: //WITHOUT FAMILY VIEW PIN: //manager.setCookies(cookies); //community.setCookies(cookies); //WITH FAMILY VIEW PIN: //manager.setCookies(cookies, 1234); //community.setCookies(cookies, 1234); client.on('webSession', function(sessionID, cookies) { console.log(GreenStyle("Got Web Session! (this is good)")); manager.setCookies(cookies, 4265); community.setCookies(cookies, 4265); }); //This is the code which blocks group invites automatically client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ client.respondToGroupInvite(steamID, false); console.log("Declined Steam Group Invite"); } });
  3. hello, i wanted to make my bot so that anyone can login to it and use it, including people who need to authenticate using the email code, the bot is to block groups automaticaally, especially csgo scam groups, but i cant get my code to work, i have tried to put null in quotations, but it seems that it does not get triggered, i have made an account that has email code to login and i use my main which has steamguard mobile code to login, but when i login the mobile authenticator account works but the email one doesnt it skips login and goes straight for the web session, the first time logging in with the email auth account it logged in twice according to the client.logged on event, then after that it skips the logOn event and goes straight for the websession. client.logOn(logOnOptions); client.setOption("promptSteamGuardCode", false); var mobile = { properties: { Steam: { description: 'Steam Mobile Code: ' }, } }; var email = { properties: { SteamE: { description: 'Steam Email Code: ' }, } }; client.on('steamGuard', function(domain, callback) { if(domain == null){ //console.log('You Are Using Phone!'); prompt.start(); prompt.get(mobile, function (err, result) { var code = result.Steam; callback(code); prompt.stop(); }); }else{ console.log('You Are Using Email!'); prompt.start(); prompt.get(email, function (err, result) { var code = result.SteamE; callback(code); prompt.stop(); }); }; and here is my full code, please help me: const TradeOfferManager = require('steam-tradeoffer-manager'); const SteamCommunity = require('steamcommunity'); const SteamUser = require('steam-user'); var prompt = require('prompt'); require('console-stamp')(console, '[HH:MM:ss]'); const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager ({ steam: client, community: community, language: 'en' }); var schema = { properties: { Account_Name: { }, Password: { hidden: true, replace: '*' }, } }; prompt.start(); prompt.get(schema, function (err, result) { const logOnOptions = { accountName: result.Account_Name, password: result.Password, rememberPassword: false, }; client.logOn(logOnOptions); client.setOption("promptSteamGuardCode", false); var mobile = { properties: { Steam: { description: 'Steam Mobile Code: ' }, } }; var email = { properties: { SteamE: { description: 'Steam Email Code: ' }, } }; client.on('steamGuard', function(domain, callback) { if(domain == null){ //console.log('You Are Using Phone!'); prompt.start(); prompt.get(mobile, function (err, result) { var code = result.Steam; callback(code); prompt.stop(); }); }else{ console.log('You Are Using Email!'); prompt.start(); prompt.get(email, function (err, result) { var code = result.SteamE; callback(code); prompt.stop(); }); }; client.on('loggedOn', () => { client.on("accountInfo", function(name, country) { console.log(' '); console.log('-----------------------------------'); console.log('Group Invite Blocker 3000'); console.log('-----------------------------------'); console.log('Succesfully logged in as: ' + result.Account_Name); console.log("Your Online Name: " + name); console.log("Your Country: " + country); console.log('-----------------------------------'); console.log(' '); client.setPersona(SteamUser.Steam.EPersonaState.Online); //client.gamesPlayed(["BOT TESTING",271590]); // client.gamesPlayed(271590); //Playing GTA 5 }); }); }); client.on('webSession', function(sessionID, cookies) { console.log("Got Web Session! (this is good)"); manager.setCookies(cookies, family view pin); community.setCookies(cookies, family view pin); }); client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ //console.log("Succesfully Decline Group Invite From" + " " + steamID); client.respondToGroupInvite(steamID, false); console.log("Declined Steam Group Invite"); } }); });
  4. if anyone else if having problems with this i have the solution use your steam group id 64, to do that go to your groups page and add "/memberslistxml/?xml=" to the end and then copy the group id from the top
  5. hello, this is my code client.on("friendMessage", function(steamID, message){ if(message == "!group" || message == "!Group"){ client..inviteToGroup(steamID, config.groupid); } }); i get no errors when running my code but when i type !group to my test bot it doesnt give any errors and does not invite me to the group i specified in the config (yes i used the group ID number which is 30012005) sorry for any formating problems i manualy typed this because the code is on my raspberry pi 3, where all my other bots are stored and run.
  6. please extend on this, i have the same probelm but i am logged in
  7. please help when i call postUserComment it says the settings on this account do not allow you to add comments, but i can manually add comments , here is all my code, please HELP!! const TradeOfferManager = require('steam-tradeoffer-manager');const SteamCommunity = require('steamcommunity');var steamParental = require('steam-parental');const SteamUser = require('steam-user');var prompt = require('prompt');var math = require('mathjs'); require('console-stamp')(console, '[HH:MM:ss]'); const client = new SteamUser();const community = new SteamCommunity();const manager = new TradeOfferManager ({steam: client,community: community,language: 'en'}); var schema = { properties: { Account_Name: { }, Password: { hidden: true, replace: '*' }, } }; prompt.start(); prompt.get(schema, function (err, result) { // console.log(' name: ' + result.AccountName); // console.log(' password: ' + result.Password); const logOnOptions = {accountName: result.Account_Name,password: result.Password,};// Disables asking for Steam Guard Codeclient.setOption("promptSteamGuardCode", true); client.logOn(logOnOptions); client.on('loggedOn', () => {client.on("accountInfo", function(name, country) { console.log(' ');console.log('-----------------------------------');console.log('Succesfully logged in as: ' + result.Account_Name);console.log("Your Online Name: " + name);console.log("Your Country: " + country);console.log('-----------------------------------');console.log('Now Blocking Group Invites');console.log('-----------------------------------');console.log(' ');client.setPersona(SteamUser.Steam.EPersonaState.Online);client.gamesPlayed(["BOT TESTING",271590]);// client.gamesPlayed(271590); //Playing GTA 5 client.on('webSession', (sessionid, cookies) => {manager.setCookies(cookies);community.setCookies(cookies); }); var Dets = { properties: { SteamID64: { }, comment: { }, times: { }, } }; prompt.start(); prompt.get(Dets, function (err, result) { // console.log("SteamID64: " + result.SteamID64); // console.log("what to comment: " + result.comment); // console.log("how many times: " + result.times); for(var i = 0; i < result.times;i++){ community.postUserComment(76561198398342583, 'test', (err) => { console.log(err); } );};});}); });}); client.on('groupRelationship', function (steamID, relationship) {if (relationship == SteamUser.Steam.EClanRelationship.Invited){//console.log("Succesfully Decline Group Invite From" + " " + steamID);client.respondToGroupInvite(steamID, false);console.log("Declined Steam Group Invite");}}); client.on("friendMessage", function(steamID, message, type) {client.getPersonas([steamID], function(personas) {var persona = personas[steamID];var name = persona ? persona.player_name : ("[" + steamID + "]");console.log("Friend message from " + name + ": " + message); });});// client.on('friendRelationship', function(steamID, relationship) { // if (relationship == SteamUser.Steam.EFriendRelationship.RequestRecipient) {// client.addFriend(steamID);// console.log(" ");// console.log("Accepted friend request from: " + steamID);// client.chatMessage(steamID, "Welcome To My Bot, type !help to get started!");// }// }); // client.on('friendRelationship', function(steamID, relationship) { // if (relationship == SteamUser.Steam.EFriendRelationship.None) {// console.log(" ");// console.log("you have been deleted by: " + steamID);// }// }); // client.on("newComments", function(count) {// console.log("You have " + count + " new comments on your profile");// }); // client.on("newItems", function(count) {// console.log("You have " + count + " new items in your inventory");// }); // client.on("tradeOffers", function(count) {// console.log("You have " + count + " new trade offers");// }); // client.on("offlineMessages", function(count) {// console.log("You have " + count + " unread messages");// }); client.on("friendMessage", function(steamID, message) {if (message == "!help") {client.chatMessage(steamID, "Type !starwars for a cool quote");}}); client.on("friendMessage", function(steamID, message) {if (message == "!help") {client.chatMessage(steamID, "Type !csgo for something funny");}}); client.on("friendMessage", function(steamID, message) {if (message == "!starwars") {client.chatMessage(steamID, "The Force will be with you. Always. — Obi-Wan Kenobi");}}); client.on("friendMessage", function(steamID, message) {if (message == "!csgo") {client.chatMessage(steamID, "You bought the game for russain lessons, right?");}});// This will fire when we receive a chat message from ANY friend// client.on('friendMessage', function(steamID, message) {// console.log("Friend message from " + steamID.getSteam3RenderedID() + ": " + message);// });
×
×
  • Create New...