Added new param discord_status_count (#183)
discord_status_count defines number of games between discord status messages being sent. Defaults to 20 Co-authored-by: aeon0 <aeon4@pm.me>
This commit is contained in:
@@ -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... |
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"))),
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user