Merge pull request #41 from xsmile/optional-telegram

Telegram: Fix being optional
pull/44/head
Michael Egger 9 years ago committed by GitHub
commit 0437546e4b

@ -31,9 +31,12 @@ def init(config: dict) -> None:
:return: None
"""
global _updater
_updater = Updater(token=config['telegram']['token'], workers=0)
_CONF.update(config)
if not _CONF['telegram']['enabled']:
return
_updater = Updater(token=config['telegram']['token'], workers=0)
# Register command handler and start telegram message polling
handles = [

Loading…
Cancel
Save