MCPcopy Index your code
hub / github.com/wechaty/python-wechaty / main

Function main

examples/contact-bot.py:68–79  ·  view source on GitHub ↗

The main function for the contact-bot module

()

Source from the content-addressed store, hash-verified

66
67
68async def main() -> None:
69 """The main function for the contact-bot module"""
70 # pylint: disable=W0603
71 global bot
72 print(WELCOME_MSG)
73 bot = Wechaty()\
74 .on('login', handle_login)\
75 .on('error', lambda error: log.info('error: %s', error))\
76 .on('scan',
77 lambda qrcode, status: print(f'{qr_terminal_str(qrcode)}\n'
78 f'[{status}] Scan QR Code in above url to login:'))
79 await bot.start()
80
81
82asyncio.run(main())

Callers 1

contact-bot.pyFile · 0.70

Calls 4

WechatyClass · 0.90
qr_terminal_strFunction · 0.90
onMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected