mirror of
https://github.com/miloira/wxhook.git
synced 2024-11-22 02:19:26 +08:00
version 0.0.3
This commit is contained in:
parent
a9fcc7a0c0
commit
70b1663939
2
setup.py
2
setup.py
@ -18,7 +18,7 @@ URL = 'https://github.com/miloira/wxhook'
|
||||
EMAIL = '690126048@qq.com'
|
||||
AUTHOR = 'Msky'
|
||||
REQUIRES_PYTHON = '>=3.8.0'
|
||||
VERSION = '0.0.2'
|
||||
VERSION = '0.0.3'
|
||||
|
||||
# What packages are required for this module to be executed?
|
||||
REQUIRED = [
|
||||
|
@ -1,3 +1,3 @@
|
||||
from .core import Bot
|
||||
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
|
@ -46,7 +46,7 @@ class Bot:
|
||||
on_after_message: typing.Callable = None,
|
||||
on_start: typing.Callable = None,
|
||||
on_stop: typing.Callable = None,
|
||||
faked_version: typing.Union[str, None] = None
|
||||
faked_version: typing.Optional[str] = None
|
||||
):
|
||||
self.version = "3.9.5.81"
|
||||
self.server_host = "127.0.0.1"
|
||||
@ -439,6 +439,7 @@ class Bot:
|
||||
self.webhook(data)
|
||||
except Exception:
|
||||
logger.error(traceback.format_exc())
|
||||
logger.error(raw_data)
|
||||
|
||||
def handle(self, events: typing.Union[list[str], str, None] = None, once: bool = False):
|
||||
def wrapper(func):
|
||||
|
@ -78,18 +78,19 @@ class RawData:
|
||||
@dataclass
|
||||
class Event:
|
||||
"""消息事件"""
|
||||
content: typing.Any # 消息内容,可能包含用户ID和冒号之后的文本内容
|
||||
createTime: int # 消息创建时间的UNIX时间戳
|
||||
displayFullContent: str # 完整的消息内容,如果有的话
|
||||
fromUser: str # 发送消息的用户或群组ID
|
||||
msgId: int # 消息的唯一标识符
|
||||
msgSequence: int # 消息序列号
|
||||
pid: int # 消息的PID
|
||||
signature: str # 消息签名,包含一系列的配置信息
|
||||
toUser: str # 消息接收者的用户ID
|
||||
type: int # 消息类型
|
||||
rawData: RawData # 原始数据
|
||||
base64Img: typing.Union[str, None] = None # 图片base64
|
||||
content: typing.Optional[typing.Any] = None # 消息内容,可能包含用户ID和冒号之后的文本内容
|
||||
base64Img: typing.Optional[str] = None # 图片base64
|
||||
data: typing.Optional[list] = None # 朋友圈数据
|
||||
createTime: typing.Optional[int] = None # 消息创建时间的UNIX时间戳
|
||||
displayFullContent: typing.Optional[str] = None # 完整的消息内容,如果有的话
|
||||
fromUser: typing.Optional[str] = None # 发送消息的用户或群组ID
|
||||
msgId: typing.Optional[int] = None # 消息的唯一标识符
|
||||
msgSequence: typing.Optional[int] = None # 消息序列号
|
||||
pid: typing.Optional[int] = None # 消息的PID
|
||||
signature: typing.Optional[str] = None # 消息签名,包含一系列的配置信息
|
||||
toUser: typing.Optional[str] = None # 消息接收者的用户ID
|
||||
type: typing.Optional[int] = None # 消息类型
|
||||
rawData: typing.Optional[RawData] = None # 原始数据
|
||||
|
||||
|
||||
@dataclass
|
||||
|
Loading…
Reference in New Issue
Block a user