torikushiii / starrail-auto

Auto check-in and others for Honkai: Star Rail
https://ko-fi.com/torikushiii
GNU Affero General Public License v3.0
106 stars 24 forks source link

Telegram notification for expedition and commands #10

Closed JiLleON closed 1 year ago

JiLleON commented 1 year ago

I noticed that with the values: staminaCheck: true, enabled: true, skipCheck: false - notifications about completed expeditions are not sent to telegram, but if I change skipCheck: true, then notifications start coming, but this is not exactly what I would like.

Also, telegram commands for manually requesting the status of expeditions/stamina do not work for me. I thought that maybe the problem is in the language of the requested site in cookies, but by changing mi18nLang: en-us nothing has changed

I can't attach any logs because there aren't any (or I don't know where the output is going). If you have time, then consider running the script in debug mode or something similar so that the user can see for himself what happens in case of errors, as well as provide you with more detailed information. Maybe there is some kind of startup key in nodejs, but I do not know.

Anyway, thanks a lot for your work, your script is very useful even when I run into any problems.

torikushiii commented 1 year ago

Hello,

I've fixed the expedition bug where it didn't send any notifications when skipCheck set to false.

As for the telegram command, it have an interval of 5 seconds before it respond to any command. Have you tried using flags? You can try node index.js --stamina or node index.js --expedition to see if it's work

JiLleON commented 1 year ago

Thanks for the fix, now it sends information about expeditions, but it looks like skipCheck: true when skipCheck: false is set (only for expeditions).

The telegram commands didn't work for me because my bot's webhook was busy with another program :D

torikushiii commented 1 year ago

What do you mean by "but it looks like skipCheck: true when skipCheck: false is set (only for expeditions)"?

JiLleON commented 1 year ago

torikushiii commented 1 year ago

oh you mean the notification is kept being send even if the skipCheck set to false?

JiLleON commented 1 year ago

yes

torikushiii commented 1 year ago

I've pushed new commit that fixes this problem and it should send notification properly now

JiLleON commented 1 year ago

now it works, thank you!