clear channel.games properly.
This commit is contained in:
parent
56afe77b52
commit
9220f84c27
1 changed files with 3 additions and 1 deletions
|
@ -97,7 +97,9 @@ class Module(object):
|
||||||
def clear_ducks(self, channel):
|
def clear_ducks(self, channel):
|
||||||
rand_time = self.generate_next_duck_time()
|
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,
|
channel.games["ducks"] = {'messages': 0, 'duck_spawned': 0,
|
||||||
'unique_users': [],
|
'unique_users': [],
|
||||||
'next_duck_time': rand_time,
|
'next_duck_time': rand_time,
|
||||||
|
|
Loading…
Reference in a new issue