Skip to content

Commit 2b3813b

Browse files
committed
feat: Move prompts to the Send Message section
1 parent f6922fc commit 2b3813b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

en/dev/star/guides/send-message.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ async def helloworld(self, event: AstrMessageEvent):
5858

5959
The above constructs a `message chain`, which will ultimately send a message containing both images and text while preserving the order.
6060

61+
> [!TIP]
62+
> In the aiocqhttp message adapter, for `plain` type messages, the `strip()` method is used during sending to remove spaces and newlines. You can solve this issue by adding a zero-width space `\u200b` before the message.
63+
6164
Similarly,
6265

6366
**File**

zh/dev/star/guides/listen-message-event.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ class AstrBotMessage:
6464
- `Nodes`:合并转发消息中的多个节点
6565
- `Poke`:戳一戳消息段
6666

67-
> [!TIP]
68-
>
69-
> 在 aiocqhttp 消息适配器中,对于 `plain` 类型的消息,在发送中会自动使用 `strip()` 方法去除空格及换行符,可以使用零宽空格 `\u200b` 解决限制。
70-
7167
在 AstrBot 中,消息链表示为 `List[BaseMessageComponent]` 类型的列表。
7268

7369
## 指令

zh/dev/star/guides/send-message.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ async def helloworld(self, event: AstrMessageEvent):
5858

5959
上面构建了一个 `message chain`,也就是消息链,最终会发送一条包含了图片和文字的消息,并且保留顺序。
6060

61+
> [!TIP]
62+
> 在 aiocqhttp 消息适配器中,对于 `plain` 类型的消息,在发送中会使用 `strip()` 方法去除空格及换行符,可以在消息前添加零宽空格 `\u200b` 解决这个问题。
63+
6164
类似地,
6265

6366
**文件 File**

0 commit comments

Comments
 (0)