PilotsTradeNetwork / EDStockTraderProject

5 stars 2 forks source link

Epic carriers getting removed from stock channel after becoming empty #37

Open TuggyBoat opened 2 years ago

TuggyBoat commented 2 years ago

According to some users, their carrier is being removed from the public list after reaching a low stock level. This has happened to both the P.T.N. Intrepid (T3F-89K) and the P.T.N. Aurora Moraine (HHN-B6N), they are also not getting the low stock pm. Both are Epic carriers.

durzo commented 2 years ago

cAPI isn't recommended for Epic carriers because the oauth is short lived, around 6 hours. regardless of the oauth ttl or the fact that we have a valid refresh token, epic kills the account link unless the game (not just the launcher) is run every 6 hours.

When the cAPI fails, the bot sends a DM to the owner advising they need to re-auth and stock fetch falls back to inara but if there is no market data (people not running EDMC) there isn't much we can do. A failure to retrieve the stock wont trigger a low stock notification.

durzo commented 2 years ago

The bot also keeps track of DM's sent, and wont send the same notification twice until the stock level returns to normal or new oauth is created.