diff --git a/ica_typing.py b/ica_typing.py index a6be29e..4bd055a 100644 --- a/ica_typing.py +++ b/ica_typing.py @@ -111,12 +111,19 @@ class IcaNewMessage: ... @property def sender_id(self) -> IcaType.UserId: + """获取发送人id""" + ... + @property + def sender_name(self) -> str: + """获取发送人名字""" ... @property def is_from_self(self) -> bool: + """是不是自己发的消息""" ... @property def is_reply(self) -> bool: + """是不是回复消息""" ... @property def is_room_msg(self) -> bool: diff --git a/plugins/hyp_vote.py b/plugins/hyp_vote.py index 3cd03a4..b030d6e 100644 --- a/plugins/hyp_vote.py +++ b/plugins/hyp_vote.py @@ -47,6 +47,8 @@ def hypvote(msg: IcaNewMessage, client: IcaClient): VOTE[msg.room_id][int(x) % 24].remove(msg.sender_id) elif arg[0] == "clear": VOTE[msg.room_id] = gen_room() + elif arg[0] == "view": + ... elif arg == [] or arg[0] == "ls": res = fmt_vote(msg.room_id) reply = msg.reply_with(res) @@ -65,6 +67,8 @@ OPTIONS clear the vote (OP only) ls list voted time, equivalent to empty + view + help show this help AUTHOR