Fix @all
This commit is contained in:
2
main.py
2
main.py
@@ -24,7 +24,7 @@ def weather_report(robot: Robot) -> None:
|
||||
|
||||
for r in receivers:
|
||||
robot.sendTextMsg(report, r)
|
||||
# robot.sendTextMsg(report, r, "nofity@all") # 发送消息并@所有人
|
||||
# robot.sendTextMsg(report, r, "notify@all") # 发送消息并@所有人
|
||||
|
||||
|
||||
def main(chat_type: int):
|
||||
|
||||
4
robot.py
4
robot.py
@@ -186,12 +186,12 @@ class Robot(Job):
|
||||
""" 发送消息
|
||||
:param msg: 消息字符串
|
||||
:param receiver: 接收人wxid或者群id
|
||||
:param at_list: 要@的wxid, @所有人的wxid为:nofity@all
|
||||
:param at_list: 要@的wxid, @所有人的wxid为:notify@all
|
||||
"""
|
||||
# msg 中需要有 @ 名单中一样数量的 @
|
||||
ats = ""
|
||||
if at_list:
|
||||
if at_list == "nofity@all": # @所有人
|
||||
if at_list == "notify@all": # @所有人
|
||||
ats = " @所有人"
|
||||
else:
|
||||
wxids = at_list.split(",")
|
||||
|
||||
Reference in New Issue
Block a user