mirror of
https://github.com/liuwons/wxBot.git
synced 2026-10-17 05:07:01 +08:00
Format code and solve the dead cycle problem.
This commit is contained in:
@@ -1,26 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
from wxbot import *
|
||||
|
||||
|
||||
class MyWXBot(WXBot):
|
||||
def handle_msg_all(self, msg):
|
||||
if msg['msg_type_id'] == 4 and msg['content']['type'] == 0:
|
||||
self.send_msg_by_uid('hi', msg['user']['id'])
|
||||
'''
|
||||
def schedule(self):
|
||||
self.send_msg('tb', 'schedule')
|
||||
time.sleep(1)
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
bot = MyWXBot()
|
||||
bot.DEBUG = True
|
||||
bot.conf['qr'] = 'png'
|
||||
bot.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
from wxbot import *
|
||||
|
||||
|
||||
class MyWXBot(WXBot):
|
||||
def handle_msg_all(self, msg):
|
||||
if msg['msg_type_id'] == 4 and msg['content']['type'] == 0:
|
||||
self.send_msg_by_uid('hi', msg['user']['id'])
|
||||
|
||||
|
||||
'''
|
||||
def schedule(self):
|
||||
self.send_msg('tb', 'schedule')
|
||||
time.sleep(1)
|
||||
'''
|
||||
|
||||
|
||||
def main():
|
||||
bot = MyWXBot()
|
||||
bot.DEBUG = True
|
||||
bot.conf['qr'] = 'png'
|
||||
bot.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user