aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar dngfx2018-08-31 13:58:44 +0100
committerGravatar dngfx2018-08-31 13:58:44 +0100
commita6d2f4cd5b96efe97abbb98f050f4579b11c36ab (patch)
tree47a3773701b029fdca82536698db83a64c34056d /modules
parentSupport replay keyword in EventHookContext.hook (diff)
signature
Decoy Fiddling
Diffstat (limited to 'modules')
-rw-r--r--modules/ducks.py9
1 files 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"]: