MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / error

Method error

astrbot/core/message/message_event_result.py:83–91  ·  view source on GitHub ↗

添加一条错误消息到消息链 `chain` 中 Example: CommandResult().error("解析失败")

(self, message: str)

Source from the content-addressed store, hash-verified

81
82 @deprecated("请使用 message 方法代替。")
83 def error(self, message: str):
84 """添加一条错误消息到消息链 `chain` 中
85
86 Example:
87 CommandResult().error("解析失败")
88
89 """
90 self.chain.append(Plain(message))
91 return self
92
93 def url_image(self, url: str):
94 """添加一条图片消息(https 链接)到消息链 `chain` 中。

Callers 15

configure_loggerMethod · 0.45
_select_providerFunction · 0.45
_apply_kbFunction · 0.45
_apply_file_extractFunction · 0.45
_ensure_img_captionFunction · 0.45
_append_video_attachmentFunction · 0.45
_process_quote_messageFunction · 0.45
_append_system_remindersFunction · 0.45
_apply_sandbox_toolsFunction · 0.45
build_main_agentFunction · 0.45
get_v3_persona_dataMethod · 0.45

Calls 2

PlainClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected