Jump to content
McKay Development

Gassi

Member
  • Posts

    3
  • Joined

  • Last visited

Gassi's Achievements

  1. You mean an Array with just one Obj? Yes I've tried it.. Also "InvalidParam" error. Example Array: [ { server_timestamp: 2020-08-13T01:21:28.000Z, ordinal: 0 } ] Nevermind.. seems like a Steam issue... getChatMessageHistory adding empty messages between and when you try to delete this invisible steam messages, you will receive that error. I just optimized the filter now: response.messages.filter((x) => !x.deleted && x.message !== '')
  2. Hey there, it seems like something is wrong with method deleteChatMessages. I've tried everything. I Just receive Error: InvalidParam on deleteChatMessages err callback. client.chat.getClanChatGroupInfo('103582791467388342', (err, response) => { console.log(err); console.log(JSON.stringify(response, null, 4)); const { chat_group_id: groupId, default_chat_id: chatId } = response.chat_group_summary; client.chat.getChatMessageHistory(groupId, chatId, { maxCount: 9999 }, (err, response) => { console.log(err); // console.log(JSON.stringify(response, null, 4)); const toDelete = response.messages.filter((x) => !x.deleted) .map((x) => ({ server_timestamp: x.server_timestamp, ordinal: x.ordinal, })); const chunks = _.chunk(toDelete, 10); // chunks.forEach((chunk) => { console.log(chunks[0]); client.chat.deleteChatMessages(groupId, chatId, chunks[0], (err) => { if (err) { logger.error(err); } else { logger.info('done!'); } }); // }); }); });
  3. Hey, i'm running Bots with your API for 1year now and today, something happen, that never happed before. Before maintenance it was the last `webLogOn()` aka `The web cookies have been set!`. The bot was running arround 24hours more (but i think we delayed accepting tradeoffers etc.) and stopped working anything. "Not logged in" on getReceivedItems callback. After this `webSession` never get fired again. I have a setInterval for doing webLogon, but this aswell not worked. let logincredentials = function () { return ( { "accountName": botconfig.account, "password": botconfig.password, "twoFactorCode": SteamTotp.generateAuthCode(botconfig.sharedsecret) }); }; function steamReconnect() { try { if (client.steamID) { client.webLogOn(); } else { client.logOn(logincredentials()); } } catch (e) { logging.error('steamReconnect', e); } } client.on("loggedOn", function (a) { logging.info("loggedOn", "The Bot has logged in!"); }); client.on("webSession", function (a, { manager.setCookies(b, function (error) { if (error) { logging.error("webSession", "setCookies error: " + error); process.exit(1); } else { community.setCookies(; community.startConfirmationChecker(polling_interval, botconfig.identifysecret); logging.info("webSession", "The web cookies have been set!"); manager.doPoll(); } }) }); community.on("confKeyNeeded", function (a, { logging.error("confKeyNeeded", "confKeyNeeded"); let time = Math.floor(Date.now() / 1000); b(null, time, SteamTotp.getConfirmationKey(botconfig.identifysecret, time, a)) }); setInterval(function () { steamReconnect(); }, 900000); Im completly clueless.. I have a log of `confKeyNeeded` Errors after this. There is nothing in the Logs. No Try/Catch Error, expect the `confKeyNeeded`. Maybe you have an Idea, where the problem could be.
×
×
  • Create New...