How to use the octobot.community.community_manager.CommunityManager function in OctoBot

To help you get started, we’ve selected a few OctoBot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Drakkar-Software / OctoBot / octobot / community / community_manager.py View on Github external
def should_register_bot(config):
        existing_id = CommunityManager._init_config_bot_id(config)
        return not existing_id
github Drakkar-Software / OctoBot / octobot / community / community_manager.py View on Github external
def background_get_id_and_register_bot(octobot_api):
        community_manager = CommunityManager(octobot_api)
        threading.Thread(target=community_manager._blocking_get_id_and_register).start()
github Drakkar-Software / OctoBot-Tentacles / Services / Interfaces / web_interface / models / configuration.py View on Github external
def manage_metrics(enable_metrics):
    current_edited_config = get_edited_config()
    if CONFIG_METRICS not in current_edited_config:
        current_edited_config[CONFIG_METRICS] = {CONFIG_ENABLED_OPTION: enable_metrics}
    else:
        current_edited_config[CONFIG_METRICS][CONFIG_ENABLED_OPTION] = enable_metrics
    if enable_metrics and CommunityManager.should_register_bot(current_edited_config):
        CommunityManager.background_get_id_and_register_bot(get_bot_api())
    config_manager.simple_save_config_update(current_edited_config)
github Drakkar-Software / OctoBot-Tentacles / Services / Interfaces / web_interface / models / configuration.py View on Github external
def manage_metrics(enable_metrics):
    current_edited_config = get_edited_config()
    if CONFIG_METRICS not in current_edited_config:
        current_edited_config[CONFIG_METRICS] = {CONFIG_ENABLED_OPTION: enable_metrics}
    else:
        current_edited_config[CONFIG_METRICS][CONFIG_ENABLED_OPTION] = enable_metrics
    if enable_metrics and CommunityManager.should_register_bot(current_edited_config):
        CommunityManager.background_get_id_and_register_bot(get_bot_api())
    config_manager.simple_save_config_update(current_edited_config)