feat: add support for sending active messages in wecom

This commit is contained in:
wangcham
2025-03-12 04:03:02 -04:00
parent 3c961e4652
commit 6a866bf871
2 changed files with 15 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ class WecomClient():
else:
raise Exception("未获取用户")
async def send_to_all(self,content:str):
async def send_to_all(self,content:str,agent_id:int):
if not self.check_access_token_for_contacts():
self.access_token_for_contacts = await self.get_access_token(self.secret_for_contacts)
@@ -77,7 +77,7 @@ class WecomClient():
params = {
"touser" : user_ids_string,
"msgtype" : "text",
"agentid" : 1000002,
"agentid" : agent_id,
"text" : {
"content" : content,
},