mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
feat: chatGPT bot
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
wechat channel
|
||||
"""
|
||||
import itchat
|
||||
import time
|
||||
import random
|
||||
import json
|
||||
from itchat.content import *
|
||||
from channel.channel import Channel
|
||||
@@ -34,6 +32,6 @@ class WechatChannel(Channel):
|
||||
self.send(super().build_reply_content(msg['Text']), from_user_id)
|
||||
|
||||
def send(self, msg, receiver):
|
||||
time.sleep(random.randint(1, 3))
|
||||
# time.sleep(random.randint(1, 3))
|
||||
print(msg, receiver)
|
||||
itchat.send(msg + " [bot]", toUserName=receiver)
|
||||
|
||||
Reference in New Issue
Block a user