diff options
| author | 2016-04-10 17:40:58 +0100 | |
|---|---|---|
| committer | 2016-04-10 17:40:58 +0100 | |
| commit | 190d42fbb527a8710a8e710dc3260ad8054a9d1d (patch) | |
| tree | d69cfbac8105ff18230b9828bec1b412e42db7ea /modules/youtube.py | |
| parent | added a confirmation of message save to in.py. (diff) | |
simpler boolean channel settings
Diffstat (limited to 'modules/youtube.py')
| -rw-r--r-- | modules/youtube.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/youtube.py b/modules/youtube.py index e20c4305..e14f9118 100644 --- a/modules/youtube.py +++ b/modules/youtube.py @@ -26,13 +26,11 @@ class Module(object): self.channel_message) bot.events.on("boot").on("done").hook(self.boot_done) - def validate_setchannel(self, s): - return s.lower() == "true" def boot_done(self, event): self.bot.events.on("postboot").on("configure").on( "channelset").call(setting="autoyoutube", help="Disable/Enable automatically getting info from youtube URLs", - validate=self.validate_setchannel) + validate=Utils.bool_or_none) def get_video_page(self, video_id, part): return Utils.get_url(URL_YOUTUBEVIDEO, get_params={"part": part, |
