Telegram: Fix being optional
This commit is contained in:
parent
3b9d354a62
commit
2df2041d53
@ -31,9 +31,12 @@ def init(config: dict) -> None:
|
|||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
global _updater
|
global _updater
|
||||||
_updater = Updater(token=config['telegram']['token'], workers=0)
|
|
||||||
|
|
||||||
_CONF.update(config)
|
_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
|
# Register command handler and start telegram message polling
|
||||||
handles = [
|
handles = [
|
||||||
|
Loading…
Reference in New Issue
Block a user