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