From bcb62cc24968903a2a89e834c7d6d003c34595e6 Mon Sep 17 00:00:00 2001 From: Brian Lee <62791515+Lz020316@users.noreply.github.com> Date: Thu, 13 Feb 2025 11:20:20 +0800 Subject: [PATCH] fix: function params useage --- docusaurus/docs/howto/event.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docusaurus/docs/howto/event.mdx b/docusaurus/docs/howto/event.mdx index 33e1eedd96a..f2bf601cc68 100644 --- a/docusaurus/docs/howto/event.mdx +++ b/docusaurus/docs/howto/event.mdx @@ -158,9 +158,9 @@ from typing import Optional import asyncio # method one -def on_scan (qrcode, status): - print('Scan QR Code to login: {}\n'.format(staus)) - print('https://wechaty.js.org/qrcode/{}'.format(qrcode)) +def on_scan (qr_code, status): + print('Scan QR Code to login: {}\n'.format(status)) + print('https://wechaty.js.org/qrcode/{}'.format(qr_code)) bot = Wechaty() bot.on('scan', on_scan) @@ -170,8 +170,8 @@ asyncio.run(bot.start()) class MyBot(Wechaty): async def on_scan(self, qr_code: str, status: ScanStatus, data: Optional[str]): """listen scan event""" - print('Scan QR Code to login: {}\n'.format(staus)) - print('https://wechaty.js.org/qrcode/{}'.format(qrcode)) + print('Scan QR Code to login: {}\n'.format(status)) + print('https://wechaty.js.org/qrcode/{}'.format(qr_code)) asyncio.run(MyBot().start()) ```