diff options
| author | 2018-09-19 13:25:12 +0100 | |
|---|---|---|
| committer | 2018-09-19 13:25:12 +0100 | |
| commit | fcbb7c960ce8c9b693711b4b40d3fa86fd17d7cf (patch) | |
| tree | 0015e3da000323b8f576f3303807176f1f4ea794 /modules/books.py | |
| parent | Fix some styling in ducks.py (diff) | |
Refactor everything to use delimited events
Diffstat (limited to 'modules/books.py')
| -rw-r--r-- | modules/books.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/books.py b/modules/books.py index efea1670..409c8613 100644 --- a/modules/books.py +++ b/modules/books.py @@ -9,11 +9,11 @@ class Module(object): _name = "ISBN" def __init__(self, bot, events, exports): self.bot = bot - events.on("received").on("command").on("isbn").hook( - self.isbn, help="Get book information from a provided ISBN", + events.on("received.command.isbn").hook(self.isbn, + help="Get book information from a provided ISBN", min_args=1, usage="<isbn>") - events.on("received").on("command").on("book").hook( - self.book, help="Get book information from a provided title", + events.on("received.command.book").hook(self.book, + help="Get book information from a provided title", min_args=1, usage="<book title>") def get_book(self, query, event): |
