clear channel.games properly.

This commit is contained in:
dngfx 2018-09-22 20:08:07 +01:00
parent 56afe77b52
commit 9220f84c27

View file

@ -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,