diff options
| author | 2018-08-31 12:55:52 +0100 | |
|---|---|---|
| committer | 2018-08-31 12:55:52 +0100 | |
| commit | 9874f79b498e1f8ae5ebec9a240963e908b645b0 (patch) | |
| tree | d5d887ac82f3e50f0ea295953981363c1c5e7c5a /modules/todo.py | |
| parent | Merge pull request #7 from dngfx/master (diff) | |
| signature | ||
Give modules event objects with "context"s, to facilitate purging all the event
hooks for a module
Diffstat (limited to 'modules/todo.py')
| -rw-r--r-- | modules/todo.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/todo.py b/modules/todo.py index 2224bbb2..8c1ead32 100644 --- a/modules/todo.py +++ b/modules/todo.py @@ -1,15 +1,15 @@ class Module(object): - def __init__(self, bot): + def __init__(self, bot, events): self.bot = bot - bot.events.on("received").on("command").on("todo").hook( + events.on("received").on("command").on("todo").hook( self.todo, help="Find out what's in your todo list", usage="[item number]") - bot.events.on("received").on("command").on("todoadd").hook( + events.on("received").on("command").on("todoadd").hook( self.todo_add, min_args=1, help="Add something to your todo list", usage="<description>") - bot.events.on("received").on("command").on("tododel").hook( + events.on("received").on("command").on("tododel").hook( self.todo_del, min_args=1, help="Remove something from your " "todo list", usage="<item number>") |
