diff --git a/README.md b/README.md index 280252e..ded532a 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ run_shenk=0 | randomize_runs | If 0, the order will always be pindle -> eldritch/shenk. If 1 the order will be random. | | difficulty | Set to `normal` `nightmare` or `hell` for game difficulty | | custom_discord_hook | Add your own discord hook here to get messages about drops and in case botty got stuck and can not resume | +| discord_status_count | Number of games between discord status messges being sent. Leave empty for no status reports. | info_screenshots | If 1, the bot takes a screenshot with timestamp on every stuck / chicken / timeout / inventory full event. This is 1 by Default, so remember to clean up the folder every once in a while | | loot_screenshots | If 1, the bot takes a screenshot with timestamp everytime he presses show_items button and saves it to loot_screenshots folder. Remember to clear them once in a while... | diff --git a/params.ini b/params.ini index a91c98d..e8dbb6a 100644 --- a/params.ini +++ b/params.ini @@ -12,6 +12,7 @@ logg_lvl=info randomize_runs=0 difficulty=hell custom_discord_hook= +discord_status_count=20 info_screenshots=1 loot_screenshots=0 diff --git a/src/config.py b/src/config.py index c2dc90a..8bd1e44 100644 --- a/src/config.py +++ b/src/config.py @@ -37,6 +37,7 @@ class Config: "randomize_runs": bool(int(self._select_val("general", "randomize_runs"))), "difficulty": self._select_val("general", "difficulty"), "custom_discord_hook": self._select_val("general", "custom_discord_hook"), + "discord_status_count": False if not self._select_val("general", "discord_status_count") else int(self._select_val("general", "discord_status_count")), "info_screenshots": bool(int(self._select_val("general", "info_screenshots"))), "loot_screenshots": bool(int(self._select_val("general", "loot_screenshots"))), } diff --git a/src/game_stats.py b/src/game_stats.py index 7b16fff..32b774c 100644 --- a/src/game_stats.py +++ b/src/game_stats.py @@ -45,7 +45,7 @@ class GameStats: def log_start_game(self): if self._game_counter > 0: self._save_stats_to_file() - if self._game_counter % 20 == 0: + if self._config.general["discord_status_count"] and self._game_counter % self._config.general["discord_status_count"] == 0: # every 20th game send a discord update about current status self._send_discord_status_update() self._game_counter += 1