giorgi-o / SkinPeek

Awesome Valorant Discord bot to see your daily shop, night market, battlepass progression, and much more
GNU General Public License v3.0
210 stars 87 forks source link

Everyday always makes me login to the bot #20

Closed sugoides closed 2 years ago

sugoides commented 2 years ago

I've been using this bot now for about a week, and something that I noticed is that, it makes me login to the bot everyday. why is that?

sugoides commented 2 years ago

btw nice bot

mistralwz commented 2 years ago

try to use storePasswords: true. you're getting logged out because the bot aren't logging in again automatically for you. there's no other solution that i know of, but let's wait to see if Giorgio has an idea.

sugoides commented 2 years ago

Niceeee, thanks, I'll let you know if it works

warriorzz commented 2 years ago

I wouldn't use storePasswords, rather use /cookies and tick the box 'remeber this device' (I don't know exactly what it is called) when logging in with your browser, this works fine for me, haven't logged in in a while.

mistralwz commented 2 years ago

I wouldn't use storePasswords, rather use /cookies and tick the box 'remeber this device' (I don't know exactly what it is called) when logging in with your browser, this works fine for me, haven't logged in in a while.

Yeah this is the safer way since passwords are stored in plain text. There has not been an option to do that on web as far as I know. The "remember this app for 30 days" is only on the Rito Client. Correct me if I am wrong though!

warriorzz commented 2 years ago

My bad, it's 'Stay signed in'.

mistralwz commented 2 years ago

In 4aac4fe5614033919a502626b0e0ad09a3222e20, Giorgio enabled that option. I think we shouldn't be logged out anymore.

@sugoides You should update your bot!

sugoides commented 2 years ago

In 4aac4fe, Giorgio enabled that option. I think we shouldn't be logged out anymore.

@sugoides You should update your bot! so even storePassword:false will it remember the login?

giorgi-o commented 2 years ago

Yup! You might have to /forget and /login again though.

sugoides commented 2 years ago

new commands !message !status !forcealerts doesn't work, is it something to do with ownerId in config, will I put my discord tag there?

mistralwz commented 2 years ago

new commands !message !status !forcealerts doesn't work, is it something to do with ownerId in config, will I put my discord tag there?

You have to put your user ID in there, not your discord tag.

sugoides commented 2 years ago

new commands !message !status !forcealerts doesn't work, is it something to do with ownerId in config, will I put my discord tag there?

got it now

sugoides commented 2 years ago

Hello, somewhat unrelated, but I host my bot in heroku, and hosting a bot in heroku have a cycling period that happens once a day, when this happens it restarts my bot, and all the logins and alert will be gone. any suggestions in interacting with this problem?

PaizTralala commented 2 years ago

Hello, somewhat unrelated, but I host my bot in heroku, and hosting a bot in heroku have a cycling period that happens once a day, when this happens it restarts my bot, and all the logins and alert will be gone. any suggestions in interacting with this problem?

Hello, first time appearing on this issue and would like to help 😊, afaik, Heroku is not the best way to host your Discord bot though, because Heroku will restart once a day, and for that.. I think you can use a VPS (Virtual Private Server), because VPS doesn't do that, if I'm wrong, I'm sorry. Maybe the other can suggest a better hosting? (Sorry if it's unrelated to the issue 😅)

sugoides commented 2 years ago

Hello, somewhat unrelated, but I host my bot in heroku, and hosting a bot in heroku have a cycling period that happens once a day, when this happens it restarts my bot, and all the logins and alert will be gone. any suggestions in interacting with this problem?

Hello, first time appearing on this issue and would like to help blush, afaik, Heroku is not the best way to host your Discord bot though, because Heroku will restart once a day, and for that.. I think you can use a VPS (Virtual Private Server), because VPS doesn't do that, if I'm wrong, I'm sorry. Maybe the other can suggest a better hosting? (Sorry if it's unrelated to the issue sweat_smile)

i've use render.com I will be monitoring if it is good for a 24/7 runtine

warriorzz commented 2 years ago

Hello, somewhat unrelated, but I host my bot in heroku, and hosting a bot in heroku have a cycling period that happens once a day, when this happens it restarts my bot, and all the logins and alert will be gone. any suggestions in interacting with this problem?

Although I haven't used Heroku at any time, you should be able to save files (like your config.json), just add all files in /path/to/your/bot/data (alerts.json, skins.json, users.json), this will save all necessary data.

sugoides commented 2 years ago

Hello, somewhat unrelated, but I host my bot in heroku, and hosting a bot in heroku have a cycling period that happens once a day, when this happens it restarts my bot, and all the logins and alert will be gone. any suggestions in interacting with this problem?

Although I haven't used Heroku at any time, you should be able to save files (like your config.json), just add all files in /path/to/your/bot/data (alters.json, skins.json, users.json), this will save all necessary data.

my prob is when I deploy the bot in heroku, the bot doesn't write on those json files although if I run the bot locally it stores data on those .json

warriorzz commented 2 years ago

Hello, somewhat unrelated, but I host my bot in heroku, and hosting a bot in heroku have a cycling period that happens once a day, when this happens it restarts my bot, and all the logins and alert will be gone. any suggestions in interacting with this problem?

Although I haven't used Heroku at any time, you should be able to save files (like your config.json), just add all files in /path/to/your/bot/data (alters.json, skins.json, users.json), this will save all necessary data.

my prob is when I deploy the bot in heroku, the bot doesn't write on those json files although if I run the bot locally it stores data on those .json

Are those files created or did you create them manually?

giorgi-o commented 2 years ago

Heroku's filesystem is ephemeral, meaning any files it creates get deleted when the server restarts. It's not a good fit for the bot unfortunately. https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem

sugoides commented 2 years ago

Heroku's filesystem is ephemeral, meaning any files it creates get deleted when the server restarts. It's not a good fit for the bot unfortunately. https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem

I was able to have a firebase cloud storage to store these json files, but haveing a hard time making the bot communicate to read and write to json files in the cloud storage

sugoides commented 2 years ago

I found the documentation for saving data in the cloud storage https://firebase.google.com/docs/database/rest/save-data but having hard time using curl in node

sugoides commented 2 years ago

I found the documentation for saving data in the cloud storage https://firebase.google.com/docs/database/rest/save-data but having hard time using curl in node

UPDATE: successfully used firebase realtime database for saving of data and get data from firebase whenever the bot starts