diff options
| author | 2018-09-19 13:25:12 +0100 | |
|---|---|---|
| committer | 2018-09-19 13:25:12 +0100 | |
| commit | fcbb7c960ce8c9b693711b4b40d3fa86fd17d7cf (patch) | |
| tree | 0015e3da000323b8f576f3303807176f1f4ea794 /modules/youtube.py | |
| parent | Fix some styling in ducks.py (diff) | |
| signature | ||
Refactor everything to use delimited events
Diffstat (limited to 'modules/youtube.py')
| -rw-r--r-- | modules/youtube.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/youtube.py b/modules/youtube.py index df158fcf..3d075f64 100644 --- a/modules/youtube.py +++ b/modules/youtube.py @@ -20,11 +20,9 @@ class Module(object): def __init__(self, bot, events, exports): self.bot = bot self.events = events - events.on("received").on("command").on("yt", "youtube" - ).hook(self.yt, + events.on("received.command").on("yt", "youtube").hook(self.yt, help="Find a video on youtube", usage="[query]") - events.on("received").on("message").on("channel").hook( - self.channel_message) + events.on("received.message.channel").hook(self.channel_message) exports.add("channelset", {"setting": "auto-youtube", "help": "Disable/Enable automatically getting info from " @@ -101,6 +99,6 @@ class Module(object): youtube_id = match.group(1) video_details = self.video_details(youtube_id) if video_details: - self.events.on("send").on("stdout").call(target=event[ - "channel"], message=video_details, module_name="Youtube", + self.events.on("send.stdout").call(target=event["channel"], + message=video_details, module_name="Youtube", server=event["server"]) |
