MikaLendingBot
MikaLendingBot copied to clipboard
[Feature] Multiple Account Support ?
hey developer, i was hoping it would be nice to implement a multiple account configs, maybe like arrays
Currently (and probably the case for the foreseeable future) you need to run multiple instances of the bot.
You can tell it to use a different config file on command line with the -cfg option
hey it will be best if you we like a json file to have multi accounts listed
Hi , it's not a problem to use two or more configs but output to telegram (and console ) just to duplicate another previous output for another account - smth like that :
account 1 output(only USD): 0.00008437 BTC Today 0.00077782 ETH Today 2.31790761 USD Today 0.00008013 BTC Yesterday 0.00103446 ETH Yesterday
Acount 2 output (Only BTC/ETH): 0.00008437 BTC Today 0.00077782 ETH Today 0.00008013 BTC Yesterday 0.00103446 ETH Yesterday
This could be achieved by passing the label in the config file embedded in the message body, and then just running multiple instances of the bot with different config files. Maybe something like this:
def send_notification(_msg, notify_conf): label = Config.get("BOT", "label") nc = notify_conf msg = label + "::" + _msg if ('notify_prefix' not in nc) else "{} {}".format(nc['notify_prefix'], _msg) ...