3urobeat / steam-comment-service-bot

📡 The most advanced Steam Account Manager Bot with mass coordinated comments/likes/favs/follows and plugin support
https://steamcommunity.com/id/3urobeatscommentbot
GNU General Public License v3.0
274 stars 40 forks source link

TypeError: Cannot read property 'time' of undefined #25

Closed Maytrix64 closed 4 years ago

Maytrix64 commented 4 years ago

So I got my last issue solved (thanks 👍 ) but I ran into an issue not long after. When I tried to get the comment bot to comment, it crashed instantly and gave me this message. I'd really appreciate any help.

C:\Users\Maytrix\Desktop\steam-comment-service-bot-master\src\bot.js:153 if ((Date.now() - lastcomment[lastcommentsteamID].time) < (config.commentcooldown * 60000)) { //check if user has cooldown applied ^

TypeError: Cannot read property 'time' of undefined at SteamUser. (C:\Users\Maytrix\Desktop\steam-comment-service-bot-master\src\bot.js:153:63) at SteamUser.emit (events.js:315:20) at SteamUser._emitIdEvent (C:\Users\Maytrix\Desktop\steam-comment-service-bot-master\node_modules\steam-user\components\utility.js:28:12) at SteamUser. (C:\Users\Maytrix\Desktop\steam-comment-service-bot-master\node_modules\steam-user\components\chatroom.js:56:8) at C:\Users\Maytrix\Desktop\steam-comment-service-bot-master\node_modules\steam-user\components\classes\HandlerManager.js:37:12 at Array.forEach () at HandlerManager.emit (C:\Users\Maytrix\Desktop\steam-comment-service-bot-master\node_modules\steam-user\components\classes\HandlerManager.js:36:12) at SteamUser._handleMessage (C:\Users\Maytrix\Desktop\steam-comment-service-bot-master\node_modules\steam-user\components\messages.js:545:24) at SteamUser._handleNetMessage (C:\Users\Maytrix\Desktop\steam-comment-service-bot-master\node_modules\steam-user\components\messages.js:480:7) at SteamUser.processMulti (C:\Users\Maytix\Desktop\steam-comment-service-bot-master\node_modules\steam-user\components\messages.js:572:9)

3urobeat commented 4 years ago

Hey, thanks for opening a new issue with your new error. I really appreciate that! :)

Two other users actually had the same error but I wasn't able to reproduce it. Please try if this solves your error: Click here: https://raw.githubusercontent.com/HerrEurobeat/steam-comment-service-bot/master/src/bot.js and replace everything in your bot.js file (located in the 'src' folder) with it.

Please report back if it works for you. If thats the case I will push it in the next version.

Maytrix64 commented 4 years ago

Hi, Thanks for getting back to me so fast. I've tried replacing all the code but it still came up with the same error message. I did some looking around and found that the command !info also shut the bot down. Apart from that if it helps to know when the bot boots up, it's boot up time is in the minus. Here's the text: [2020-05-11 22:51:38] Logging in... Estimated wait time: -7.72 seconds.

Thanks for your help so far.

On Mon, 11 May 2020 at 22:24, 3urobeat notifications@github.com wrote:

Hey, thanks for opening a new issue with your new error. I really appreciate that! :)

Two other users actually had the same error but I wasn't able to reproduce it. Please try if this solves your error: Click here: https://raw.githubusercontent.com/HerrEurobeat/steam-comment-service-bot/master/src/bot.js and replace everything in your bot.js file (located in the 'src' folder) with it.

Please report back if it works for you. If thats the case I will push it in the next version.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HerrEurobeat/steam-comment-service-bot/issues/25#issuecomment-626669226, or unsubscribe https://github.com/notifications/unsubscribe-auth/APRBQL2ZHUBQ3M3QEZ6U5M3RQ7VBFANCNFSM4M523DAA .

3urobeat commented 4 years ago

Oh I actually send you the wrong link. Please replace the file with this: https://raw.githubusercontent.com/HerrEurobeat/steam-comment-service-bot/beta-testing/src/bot.js Sorry for the confusion.

Yeah I know why it crashes but I don't know where the bot forgets to write the data that is missing. Sadly I couldn't reproduce the error yet which makes it of course more difficult for me to fix.

Maytrix64 commented 4 years ago

Oh I actually send you the wrong link. Please replace the file with this: https://raw.githubusercontent.com/HerrEurobeat/steam-comment-service-bot/beta-testing/src/bot.js Sorry for the confusion.

Yeah I know why it crashes but I don't know where the bot forgets to write the data that is missing. Sadly I couldn't reproduce the error yet which makes it of course more difficult for me to fix.

Thanks so much man this worked right away :)