frk1/steamhourboostv2

telebot not working

Closed this issue · 7 comments

The bot can jsut get me the list of accounts. If i try to do something els it just spames me with : " The following accounts are available: " and this message can come up to 20 times a sec.

#edit
after redownloading and buildind everything i discovered, that the script restarts xtimes a second (like i get the messages)

Error log:
at new Hmac (crypto.js:117:16)
at Object.createHmac (crypto.js:643:10)
at Object.exports.generateAuthCode.exports.getAuthCode (/home/jukas/git/steamhourboostv2/node_modules/steam-totp/index.js:43:20)
at exports.getTimeOffset (/home/jukas/git/steamhourboostv2/node_modules/steam-totp/index.js:28:23)
at IncomingMessage.res.on (/home/jukas/git/steamhourboostv2/node_modules/steam-totp/index.js:128:4)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1055:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)

frk1 commented

node -v ?

Operating system?

Are you using docker or "normal" nodejs? pm2?

i am using the normal version at v8.9.4

i was monitoring it for a while this morning and just figgured out, that i just get the spam messages, if i type in telegram something els than /list
the bot is restarting all over until i remove the admin key in the telebot.json

frk1 commented

Does the bot have accounts with secret shared key?

sry 4 late anwer.
do u mean the key in the database.json ? yea there is a key.

i have the same problem.
and an additional question: is it possible to only boost one account in the database file?

frk1 commented

@Snowyy88
Yes, for the accounts that you don't want to boost just add an empty array for the gameids:

[]

cmd64 commented

App crashed when starting multiple accounts with telebot.

I added if(acc) to line 66 in lib/telebot.js and it started without any problem and telebot is not spamming.

bot.hears(/(.*)/, ctx => { const [name] = Array.from(fuzzy(ctx.message.text)) if (name) { const acc = R.find(R.propEq("name", name), database) if(acc){ return totp(acc.secret) .then(code => ctx.replyWithMarkdown(
Selected account ${acc.name}.

2FA-Code: `${code}`
) ) .catch(err => ctx.replyWithMarkdown(
Selected account ${acc.name}.

Error: `${err}`
) ) } } return ctx.replyWithMarkdown(
Could not find a matching account!

Try /list to get a list of available accounts!
) })