mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 22:46:40 +00:00 
			
		
		
		
	📝 update api docs
This commit is contained in:
		| @@ -197,6 +197,16 @@ sidebarDepth: 0 | |||||||
| @指定手机号人员 | @指定手机号人员 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ### _static_ `atDingtalkIds(*dingtalkIds)` | ||||||
|  |  | ||||||
|  | @指定 id,@ 默认会在消息段末尾。 | ||||||
|  | 所以你可以在消息中使用 @{senderId} 占位,发送出去之后 @ 就会出现在占位的位置: | ||||||
|  | ``python | ||||||
|  | message = MessageSegment.text(f"@{event.senderId},你好") | ||||||
|  | message += MessageSegment.atDingtalkIds(event.senderId) | ||||||
|  | `` | ||||||
|  |  | ||||||
|  |  | ||||||
| ### _static_ `text(text)` | ### _static_ `text(text)` | ||||||
|  |  | ||||||
| 发送 `text` 类型消息 | 发送 `text` 类型消息 | ||||||
| @@ -212,6 +222,11 @@ sidebarDepth: 0 | |||||||
| "标记 text 文本的 extension 属性,需要与 text 消息段相加。 | "标记 text 文本的 extension 属性,需要与 text 消息段相加。 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ### _static_ `code(code_language, code)` | ||||||
|  |  | ||||||
|  | "发送 code 消息段 | ||||||
|  |  | ||||||
|  |  | ||||||
| ### _static_ `markdown(title, text)` | ### _static_ `markdown(title, text)` | ||||||
|  |  | ||||||
| 发送 `markdown` 类型消息 | 发送 `markdown` 类型消息 | ||||||
|   | |||||||
| @@ -177,7 +177,8 @@ Rule(async_function, run_sync(sync_function)) | |||||||
|  |  | ||||||
|     根据正则表达式进行匹配。 |     根据正则表达式进行匹配。 | ||||||
|  |  | ||||||
|     可以通过 `state["_matched"]` 获取正则表达式匹配成功的文本。 |     可以通过 `state["_matched"]` `state["_matched_groups"]` `state["_matched_dict"]` | ||||||
|  |     获取正则表达式匹配成功的文本。 | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user