Open tonymorony opened 4 years ago
would you need this function to work alongside startall/stopall cmds? so that if you add custom ticker you will be able to start it with all the others or it doesnt really matter?
I thought about that as a possibility of rewrite/edit of assetchains file so startall/stopall should just check content of this file on each execution E.g. I can delete all entries and add one or just append one
As I think easiest way is to return current file (as a file in message - not file content) and support uploading it back
Probably after research on that it will be easier for you to proceed on https://github.com/dathbezumniy/kmd-sync-bot/issues/6
in the bot's api state apart from startall/stopall tickers, there are /start_sync ticker and /stop_sync ticker as it was in the early stages without the state functionality so that you can launch only the chains that you need. I can easily add another api call and commands to bot like /setup_custom_ticker or something and then you will be able to start it with /start_sync ticker and /stop_sync ticker.
These custom launch parameters will be processed by api without addition to default assetchains launch params and will be stored only in bot's memory until the next bot reboot/restart/crash, but startall/stopall will not start them and stopall will not clean the data of those custom chains.
Let me know if you want me to proceed with the above plan. Another possible solution is to just upload custom assetchains.json through bot so that user will be able to add whatever launch params he wants and then startall/stopall cmds will work as expected.
but this upload is not the "easiest" way to do that :D because i would need to parse that file and check if the daemon would actually be able to start these custom chains
add function to return to default assetchains.json launch params
Best resource on files uloading/downloading matter: https://core.telegram.org/api/files
As I understand the flow for file uploading will be something like: 1) User upload it into the Telegram 2) You get direct link via Telegram API 3) wget on server with API
To be able to add own assetchains which doesn't presists in assetchains.json