Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions en/dev/star/guides/send-message.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ async def helloworld(self, event: AstrMessageEvent):

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

> [!TIP]
> In the aiocqhttp message adapter, for messages of type `plain`, the `strip()` method is used during sending to remove spaces and line breaks. You can add zero-width spaces `\u200b` before and after the message to resolve this issue.

Similarly,

**File**
Expand Down
4 changes: 0 additions & 4 deletions zh/dev/star/guides/listen-message-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ class AstrBotMessage:
- `Nodes`:合并转发消息中的多个节点
- `Poke`:戳一戳消息段

> [!TIP]
>
> 在aiocqhttp消息适配器中,对于 `plain` 类型的消息,在发送中会自动使用 `strip()` 方法去除空格及换行符,可以使用零宽空格 `\u200b` 解决限制。

在 AstrBot 中,消息链表示为 `List[BaseMessageComponent]` 类型的列表。

## 指令
Expand Down
3 changes: 3 additions & 0 deletions zh/dev/star/guides/send-message.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ async def helloworld(self, event: AstrMessageEvent):

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

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

类似地,

**文件 File**
Expand Down