Config

Contains all the configuration parameters for the application.
Call get_config() to initialize the configuration from the config file.
exception ConfigError(msg: str)

Bases: Exception

Raised when an error occur while reading the config file.

Parameters

msg – Error message.

factions = {1: 'VS', 2: 'NC', 3: 'TR'}

Dictionary to retrieve faction name by id.

i_factions = {'NC': 2, 'TR': 3, 'VS': 1}

Dictionary to retrieve faction id by name.

zones = {2: 'Indar', 4: 'Hossin', 6: 'Amerish', 8: 'Esamir'}

Dictionary to retrieve zone name by id.

facility_suffix = {2: 'Amp Station', 3: 'Bio Lab', 4: 'Tech Plant'}

Dictionary to retrieve facility suffix by id.

loadout_id = {1: 'infiltrator', 3: 'light_assault', 4: 'medic', 5: 'engineer', 6: 'heavy_assault', 7: 'max', 8: 'infiltrator', 10: 'light_assault', 11: 'medic', 12: 'engineer', 13: 'heavy_assault', 14: 'max', 15: 'infiltrator', 17: 'light_assault', 18: 'medic', 19: 'engineer', 20: 'heavy_assault', 21: 'max'}

Dictionary to retrieve loadout name by id.

base_to_id = {'acan': 302030, 'bridgewater': 272000, 'ceres': 219, 'chac': 307010, 'ghanan': 305010, 'kessel': 266000, 'nettlemire': 283000, 'ns_material': 224, 'pale': 239000, 'peris': 3430, 'rashnu': 3620, 'rime': 244610, 'xeno': 230}

Dictionary to retrieve base id from name.

id_to_base = {219: 'ceres', 224: 'ns_material', 230: 'xeno', 3430: 'peris', 3620: 'rashnu', 239000: 'pale', 244610: 'rime', 266000: 'kessel', 272000: 'bridgewater', 283000: 'nettlemire', 302030: 'acan', 305010: 'ghanan', 307010: 'chac'}

Dictionary to retrieve base name from id.

general = {'api_key': '', 'command_prefix': '', 'lobby_size': 0, 'round_length': 0, 'rules_msg_id': 0, 'token': ''}

Contains general parameters.

ts = {'config_help': '', 'lobby_id': 0, 'matches': [], 'url': ''}

Contains TS3 parameters.

channels = {'lobby': 0, 'matches': [], 'muted': 0, 'register': 0, 'results': 0, 'rules': 0, 'spam': 0, 'staff': 0, 'usage': 0}

Contains discord channel IDs.

channels_list = []

Contains all channels the bot should read/interact in.

roles = {'admin': 0, 'notify': 0, 'registered': 0}

Contains discord roles IDs.

emojis = {'NC': '', 'TR': '', 'VS': ''}

Contains discord emojis IDs.

scores = {'capture': 0, 'recapture': 0, 'suicide': 0, 'teamkill': 0}

Contains scoring parameters.

database = {'accounts': '', 'cluster': '', 'collections': {'accounts_usage': '', 'match_logs': '', 'matches': '', 'player_stats': '', 'restart_data': '', 'static_bases': '', 'static_weapons': '', 'users': ''}, 'jaeger_cal': '', 'url': ''}

Contains database parameters.

base_images = {}

Contains url for base images.

get_config(launch_str: str)

Populate the config data from the config file.

Parameters

launch_str – Config file suffix. Useful to have different configurations files.