添加 sender_name
This commit is contained in:
parent
f228fdde69
commit
f51d045dda
@ -111,12 +111,19 @@ class IcaNewMessage:
|
|||||||
...
|
...
|
||||||
@property
|
@property
|
||||||
def sender_id(self) -> IcaType.UserId:
|
def sender_id(self) -> IcaType.UserId:
|
||||||
|
"""获取发送人id"""
|
||||||
|
...
|
||||||
|
@property
|
||||||
|
def sender_name(self) -> str:
|
||||||
|
"""获取发送人名字"""
|
||||||
...
|
...
|
||||||
@property
|
@property
|
||||||
def is_from_self(self) -> bool:
|
def is_from_self(self) -> bool:
|
||||||
|
"""是不是自己发的消息"""
|
||||||
...
|
...
|
||||||
@property
|
@property
|
||||||
def is_reply(self) -> bool:
|
def is_reply(self) -> bool:
|
||||||
|
"""是不是回复消息"""
|
||||||
...
|
...
|
||||||
@property
|
@property
|
||||||
def is_room_msg(self) -> bool:
|
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)
|
VOTE[msg.room_id][int(x) % 24].remove(msg.sender_id)
|
||||||
elif arg[0] == "clear":
|
elif arg[0] == "clear":
|
||||||
VOTE[msg.room_id] = gen_room()
|
VOTE[msg.room_id] = gen_room()
|
||||||
|
elif arg[0] == "view":
|
||||||
|
...
|
||||||
elif arg == [] or arg[0] == "ls":
|
elif arg == [] or arg[0] == "ls":
|
||||||
res = fmt_vote(msg.room_id)
|
res = fmt_vote(msg.room_id)
|
||||||
reply = msg.reply_with(res)
|
reply = msg.reply_with(res)
|
||||||
@ -65,6 +67,8 @@ OPTIONS
|
|||||||
clear the vote (OP only)
|
clear the vote (OP only)
|
||||||
ls
|
ls
|
||||||
list voted time, equivalent to empty
|
list voted time, equivalent to empty
|
||||||
|
view <space seperated hour>
|
||||||
|
|
||||||
help
|
help
|
||||||
show this help
|
show this help
|
||||||
AUTHOR
|
AUTHOR
|
||||||
|
Loading…
Reference in New Issue
Block a user