File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 16
16
import os
17
17
import asyncio
18
18
19
+ from urllib .parse import quote
20
+
19
21
from wechaty import (
20
22
Contact ,
21
23
FileBox ,
@@ -49,7 +51,7 @@ async def on_scan(
49
51
Scan Handler for the Bot
50
52
"""
51
53
print ('Status: ' + str (status ))
52
- print ('View QR Code Online: https://wechaty.js.org/qrcode/' + qrcode )
54
+ print ('View QR Code Online: https://wechaty.js.org/qrcode/' + quote ( qrcode ) )
53
55
54
56
55
57
async def on_login (user : Contact ):
@@ -68,6 +70,15 @@ async def main():
68
70
# Make sure we have set WECHATY_PUPPET_SERVICE_TOKEN in the environment variables.
69
71
# Learn more about services (and TOKEN) from https://wechaty.js.org/docs/puppet-services/
70
72
#
73
+ # It is highly recommanded to use token like [paimon] and [wxwork].
74
+ # Those types of puppet_service are supported natively.
75
+ # https://wechaty.js.org/docs/puppet-services/paimon
76
+ # https://wechaty.js.org/docs/puppet-services/wxwork
77
+ #
78
+ # Replace your token here and umcommt that line, you can just run this python file successfully!
79
+ # os.environ['token'] = 'puppet_paimon_your_token'
80
+ # os.environ['token'] = 'puppet_wxwork_your_token'
81
+ #
71
82
if 'WECHATY_PUPPET_SERVICE_TOKEN' not in os .environ :
72
83
print ('''
73
84
Error: WECHATY_PUPPET_SERVICE_TOKEN is not found in the environment variables
You can’t perform that action at this time.
0 commit comments