asr/plugins/wechat_agent.py
2024-08-03 17:27:14 +08:00

12 lines
367 B
Python

import itchat
from appPublic.worker import awaitify
from appPublic.dictObject import DictObject
from appPublic.background import Background
from ahserver.globalEnv import GlobalEnv
def wechat_login(login_callback, qr_callback):
Background(itchat.login, login_callback=login_callback,
qr_callback=qr_callback)
g = GlobalEnv()
g.wechat_login = wechat_login