From 9220f84c277df19f72195371fabd140883ad5708 Mon Sep 17 00:00:00 2001 From: dngfx <294904+dngfx@users.noreply.github.com> Date: Sat, 22 Sep 2018 20:08:07 +0100 Subject: [PATCH] clear channel.games properly. --- modules/ducks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ducks.py b/modules/ducks.py index 33d8e5e6..c2ae696c 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -97,7 +97,9 @@ class Module(object): def clear_ducks(self, channel): rand_time = self.generate_next_duck_time() - del channel.games["ducks"] + if hasattr(channel.games, "ducks"): + del channel.games["ducks"] + channel.games["ducks"] = {'messages': 0, 'duck_spawned': 0, 'unique_users': [], 'next_duck_time': rand_time,