The main function for the contact-bot module
()
| 66 | |
| 67 | |
| 68 | async 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 | |
| 82 | asyncio.run(main()) |
no test coverage detected