feat: only log core events if DEBUG env var is set
This commit is contained in:
parent
0bf351f252
commit
cc75191709
|
|
@ -1,3 +1,5 @@
|
|||
import os
|
||||
|
||||
from deltachat_rpc_client import events, run_bot_cli, EventType, Message
|
||||
from email_validator import validate_email, EmailNotValidError
|
||||
|
||||
|
|
@ -86,7 +88,8 @@ def catch_events(event):
|
|||
|
||||
:param event: the event object
|
||||
"""
|
||||
print(event)
|
||||
if os.getenv("DEBUG"):
|
||||
print(event)
|
||||
if event.kind == EventType.IMAP_CONNECTED:
|
||||
event.account.set_config("selfstatus", HELP_MSG)
|
||||
print("The bot can be reached via this invite link: " + event.account.get_qr_code())
|
||||
|
|
|
|||
Loading…
Reference in a new issue