From a6d2f4cd5b96efe97abbb98f050f4579b11c36ab Mon Sep 17 00:00:00 2001 From: dngfx <294904+dngfx@users.noreply.github.com> Date: Fri, 31 Aug 2018 13:58:44 +0100 Subject: [PATCH] Decoy Fiddling --- modules/ducks.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/ducks.py b/modules/ducks.py index 355abfd9..0e719481 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -89,7 +89,7 @@ class Module(object): return random.randint(self.duck_times[min], self.duck_times[max]) def decoy_time(self): - return random.randint(300, 700) + return random.randint(10, 20) def duck_bef(self, event): @@ -193,12 +193,15 @@ class Module(object): "・ ゜・。 ​ 。・゜゜ \​_ó< beep beep!" ] - event["target"].send_message(random.choice(ducks)) + event["channel"].send_message(random.choice(ducks)) def set_decoy(self, event): + channel = event + next_decoy_time = self.decoy_time() self.events.on("timer").on("duck-decoy").hook(self.duck_decoy) - self.bot.add_timer("duck-decoy", next_decoy_time, persist=False) + self.bot.add_timer("duck-decoy", next_decoy_time, None, None, False, + channel=channel) # def coins(self, event): # if event["args_split"]: