diff options
| author | 2019-05-11 17:19:31 +0100 | |
|---|---|---|
| committer | 2019-05-11 17:19:31 +0100 | |
| commit | 6ef7f8374d4d4b758616c9e1dfb8bfc1fcc298f9 (patch) | |
| tree | 83e917a46e128cedaa702d8472b7a40f1124004e /modules | |
| parent | Update !help usage string (diff) | |
| signature | ||
Change ducks-min-message default to 100
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/ducks.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/ducks.py b/modules/ducks.py index 8777e4a4..d9081ffb 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -4,6 +4,8 @@ from src import EventManager, ModuleManager, utils DUCK = "・゜゜・。。・゜゜\_o< QUACK!" NO_DUCK = "There was no duck!" +DEFAUL_MIN_MESSAGES = 100 + @utils.export("channelset", {"setting": "ducks-enabled", "help": "Whether or not to spawn ducks", "validate": utils.bool_or_none}) @utils.export("channelset", {"setting": "ducks-min-messages", @@ -29,7 +31,8 @@ class Module(ModuleManager.BaseModule): if ducks_enabled and not channel.duck_active: channel.duck_lines += 1 - min_lines = channel.get_setting("ducks-min-messages", 40) + min_lines = channel.get_setting("ducks-min-messages", + DEFAULT_MIN_MESSAGES) if channel.duck_lines >= min_lines: show_duck = random.SystemRandom().randint(1, 20) == 1 |
