添加 sender_name
This commit is contained in:
parent
f228fdde69
commit
f51d045dda
@ -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:
|
||||
|
@ -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 <space seperated hour>
|
||||
|
||||
help
|
||||
show this help
|
||||
AUTHOR
|
||||
|
Loading…
Reference in New Issue
Block a user