bot
bot copied to clipboard
Next Config file
Hey, I was wondering how can i load the next account after 1 is sleeping? I cant find anything related to it in the code
remove the repeat in the config and try this:
main.py
import yaml
from subprocess import Popen
import logging
logger = logging.getLogger("configs-loader")
logging.basicConfig(level=logging.INFO,
format='[%(asctime)s] %(name)-12s ==> %(message)s',
datefmt='%m/%d %H:%M:%S',)
if __name__ == '__main__':
bot_run = "gramaddict run --config".split(" ")
with open('configs-list.yml', 'r') as stream:
try:
configs = yaml.safe_load(stream)
for config in configs:
bot_run.append(configs.get(config, {}).get("path", ""))
with Popen(bot_run, text=True) as p:
logger.info(f"Starting `{config}` - {configs[config].get('path')}")
logger.info("Finish!")
except yaml.YAMLError as exc:
logger.error(exc)
exit(1)
configs-list.yml
your_config1_name_here:
description: "your config1 description"
path: "your_path_to_config1_here"
your_config2_name_here:
description: "your config2 description"
path: "your_path_to_config2_here"
pip install pyyaml
if not installed
Do i need to change main.py or only the configs-list.yml?
You have to configure your config-lst.yml as hinted in my post
this isnt very clear though.. Do i need to add this to my config.yml file instead of REPEAT ? Do i need to edit Main.py and add what u sent above? Do i need to make a configs-list.yml file? Please be more informative, Im new in this.
?
Did anyone get this to work? Thanks!