epicgames-freegames-node
epicgames-freegames-node copied to clipboard
Suggestions
I have a few suggestions that you might be interested in:
- Alow users to use telegram bot api as an alternative to send the captcha notification:
This might help with people that use other emailing services instead of telegram, I know that smtp is flexible but a few emailing services like Protonmail for example don't have smtp implemented due to the encryption they are using. Protonmail makes a little exception with this by allowing you to run a bridge on you computer/server to access the smtp feature but the problem with that it's that's only for premium users.
Sending a message using telegram's bot api is easy since it just requires you sending a http request:
https://api.telegram.org/bot[BOT_API_KEY]/sendMessage?chat_id=[MY_CHANNEL_NAME]&text=[MY_MESSAGE_TEXT]
- Retry connections to google/epic games x amount of times
Sometimes connecting to google requires 2 tries because it might happen to fail with an
Invalid login
error, so a variable that controls how many retries the app can do connecting would be helpful. Also something like this might help with network issues. Anyway, I will add a log with the error I'm facing sometimes when I start the container. As I said restarting the container again makes the connection.
Log
[2021-02-25 04:34:08.043 -0600] ERROR (18 on 9f3dee812c7c): Invalid login: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv
534-5.7.14 ZiMY0R7beKkxnrRVKyTt1v8Z7RYC8-SMoAe5YkLFl-2ME8GBLmF3ckYYXq9NlPPAqtM6K
534-5.7.14 yjFxEjXynkfcQpsaTbFymT9y9uC-RrUIgErKchGUKA92DzGvXMldDkpoyzwQLEzg>
534-5.7.14 Please log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 t8sm3165386edv.16 - gsmtp
Error: Invalid login: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv
534-5.7.14 ZiMY0R7beKkxnrRVKyTt1v8Z7RYC8-SMoAe5YkLFl-2ME8GBLmF3ckYYXq9NlPPAqtM6K
534-5.7.14 yjFxEjXynkfcQpsaTbFymT9y9uC-RrUIgErKchGUKA92DzGvXMldDkpoyzwQLEzg>
534-5.7.14 Please log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 t8sm3165386edv.16 - gsmtp
at SMTPConnection._formatError (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
at SMTPConnection._actionAUTHComplete (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:1523:34)
at SMTPConnection.
(/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:550:26) at SMTPConnection._processResponse (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:942:20)
at SMTPConnection._onData (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
at TLSSocket.SMTPConnection._onSocketData (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)
at TLSSocket.emit (events.js:314:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:272:9)
at TLSSocket.Readable.push (_stream_readable.js:213:10)
[2021-02-25 04:34:08.051 -0600] ERROR (18 on 9f3dee812c7c): 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv
534-5.7.14 ZiMY0R7beKkxnrRVKyTt1v8Z7RYC8-SMoAe5YkLFl-2ME8GBLmF3ckYYXq9NlPPAqtM6K
534-5.7.14 yjFxEjXynkfcQpsaTbFymT9y9uC-RrUIgErKchGUKA92DzGvXMldDkpoyzwQLEzg>
534-5.7.14 Please log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 t8sm3165386edv.16 - gsmtp
[2021-02-25 04:34:08.051 -0600] ERROR (18 on 9f3dee812c7c): Invalid login: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv
534-5.7.14 ZiMY0R7beKkxnrRVKyTt1v8Z7RYC8-SMoAe5YkLFl-2ME8GBLmF3ckYYXq9NlPPAqtM6K
534-5.7.14 yjFxEjXynkfcQpsaTbFymT9y9uC-RrUIgErKchGUKA92DzGvXMldDkpoyzwQLEzg>
534-5.7.14 Please log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 t8sm3165386edv.16 - gsmtp
Error: Invalid login: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbv
534-5.7.14 ZiMY0R7beKkxnrRVKyTt1v8Z7RYC8-SMoAe5YkLFl-2ME8GBLmF3ckYYXq9NlPPAqtM6K
534-5.7.14 yjFxEjXynkfcQpsaTbFymT9y9uC-RrUIgErKchGUKA92DzGvXMldDkpoyzwQLEzg>
534-5.7.14 Please log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 t8sm3165386edv.16 - gsmtp
at SMTPConnection._formatError (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)
at SMTPConnection._actionAUTHComplete (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:1523:34)
at SMTPConnection.
(/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:550:26) at SMTPConnection._processResponse (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:942:20)
at SMTPConnection._onData (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)
at TLSSocket.SMTPConnection._onSocketData (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)
at TLSSocket.emit (events.js:314:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:272:9)
at TLSSocket.Readable.push (_stream_readable.js:213:10)
Alow users to use telegram bot api as an alternative to send the captcha notification
It might be a better idea to give the option of triggering a webhook rather than offering only telegram integration. I was just looking to see if there was the possibility of sending the captcha on a discord channel.
@maxime-killinger I looked into this slightly, but quickly discovered that webhooks are not really according to any standard. The discord webhooks differs quite a lot from something like a slack webhook. So unless you know a way to unify them, it would be needed to implement each webhook endpoint separately (Like have a template), which could be done but would require some work.
Discord support some json format like the slack format for the webhooks. You can have an example here. You just have to append /slack
at the end of the discord webhook url.
It's a start
Telegram notification was added in v4: https://claabs.github.io/epicgames-freegames-node/classes/TelegramConfig.html