Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.
Sender binds to the current runtime context. For message triggers, it represents the current IM, account, chat, and user. For route triggers, it represents the current HTTP request. Cron / fake contexts may not point to a real IM chat.
from middleware import Sender, getSenderIDsender = Sender(getSenderID())
Read message context
These methods take no arguments and return fields from the current runtime context. Missing fields usually return an empty string, empty array, or False.
Method
Purpose
Parameters
Returns
getImtype()
Get the current IM type. Cron runs may return fake.
None
str
getUserID()
Get the current user ID.
None
str
getUserName()
Get the current user display name.
None
str
getUserAvatarUrl()
Get the current user avatar URL.
None
str
getChatID()
Get the current chat ID; group chats use group ID, private chats are often empty.
None
str
getChatName()
Get the current chat name.
None
str
getGroupName()
Get the group name. Same as getChatName().
None
str
isAdmin()
Check whether the current user is an administrator.
None
bool
isAI()
Check whether the message came from an AI trigger context.
None
bool
getAIParam()
Get the AI parameter.
None
str
getMessage()
Get the current message text.
None
str
getMessageID()
Get the current message ID.
None
str
getHistoryMessageIDs(number)
Get recent message IDs.
number: required count.
list[str]
param(index)
Read a rule regex capture.
index starts at 1; out-of-range returns an empty string.
str
user = sender.getUserName()message = sender.getMessage()first_match = sender.param(1)sender.reply(f"{user} sent: {message}\nParam: {first_match}")
Reply with text and media
reply* methods reply to the current runtime context. For message triggers, they reply to the current chat. For route triggers, reply(...) / replyMarkdown(...) can write the route response. A cron fake context does not send a real IM reply.
Method
Purpose
Parameters
Returns
reply(text)
Reply with plain text.
text: required.
SendReceipt
replyMarkdown(markdown)
Reply with Markdown text. Rendering depends on the adapter.
markdown: required.
SendReceipt
replyImage(source, options=None)
Reply with an image.
Image URL, path, base64, or data URI; options optional.
SendReceipt
replyVoice(source, options=None)
Reply with voice/audio.
Voice URL or path; options optional.
SendReceipt
replyVideo(source, options=None)
Reply with a video.
Video URL or path; options optional.
SendReceipt
replyFile(source, options=None)
Reply with a file.
File URL or path; options optional.
SendReceipt
replyMixed(items, options=None)
Reply with structured mixed messages.
items: required mixed items.
SendReceipt
returnValue(text)
Set the runtime return value without sending an IM message.
replyImage(...) and other current-chat reply methods do not need imType, group ID, or user ID. Use push(...) or push* when you need to choose the target.
MediaOptions
Media reply methods accept an optional dictionary as the second parameter.
string
Display filename. Also accepted as fileName or file_name.
string
MIME type. Also accepted as mime_type.
number
Media request timeout. Millisecond values are converted to request timeout.
Control flow
Method
Purpose
Parameters
Returns
setContinue()
Continue matching subsequent plugins.
None
bool
recallMessage(messageid)
Recall a message.
messageid: message ID.
SendReceipt
breakIn(content)
Re-enter the message pipeline with new text.
content: required.
Runtime result
if sender.isAdmin(): sender.setContinue()else: sender.reply("Only administrators can continue.")
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"autClaw Docs","description":"autClaw 文档:自托管机器人与插件运行平台,支持一键脚本和 Docker 部署(Linux / 飞牛 OS / 群晖),默认端口 8200,可用 JavaScript / Python 开发插件。","colors":{"primary":"#2563EB","light":"#60A5FA","dark":"#1D4ED8"},"logo":{"light":"https://mintcdn.com/ac-d39c0861/KribYGZz2OzluLTs/logo/light.svg?fit=max\u0026auto=format\u0026n=KribYGZz2OzluLTs\u0026q=85\u0026s=7be83e46a445b837c7b0ad78cad87edb","dark":"https://mintcdn.com/ac-d39c0861/KribYGZz2OzluLTs/logo/dark.svg?fit=max\u0026auto=format\u0026n=KribYGZz2OzluLTs\u0026q=85\u0026s=1337f8e53e83b544e300df4e1d72fd95"},"favicon":"https://mintcdn.com/ac-d39c0861/KribYGZz2OzluLTs/favicon.svg?fit=max\u0026auto=format\u0026n=KribYGZz2OzluLTs\u0026q=85\u0026s=b90336b2507e4c0609b3787fb702b6bf","navbar":{"links":[{"href":"https://github.com/WGwuzhi/autClaw","label":"GitHub"}],"primary":{"type":"button","label":"部署 autClaw","href":"/cn/getting-started/deploy"}},"footer":{"socials":{"github":"https://github.com/WGwuzhi/autClaw"}},"search":{"prompt":"搜索部署、升级或插件 SDK..."},"seo":{"metatags":{"canonical":"https://autclaw.shop","robots":"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1","og:site_name":"autClaw Docs","twitter:card":"summary_large_image","application-name":"autClaw Docs","apple-mobile-web-app-title":"autClaw Docs","theme-color":"#2563EB"},"indexing":"navigable"},"icons":{"library":"lucide"},"errors":{"404":{"redirect":false,"title":"页面未找到","description":"你访问的页面不存在。返回 [中文首页](/cn) 或切换到 [English home](/en)。"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"languages":[{"language":"zh-Hans","default":true,"navbar":{"links":[{"href":"https://github.com/WGwuzhi/autClaw","label":"GitHub"}],"primary":{"type":"button","label":"部署 autClaw","href":"/cn/getting-started/deploy"}},"href":"cn"},{"language":"en","navbar":{"links":[{"href":"https://github.com/WGwuzhi/autClaw","label":"GitHub"}],"primary":{"type":"button","label":"Deploy autClaw","href":"/en/getting-started/deploy"}},"href":"en"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ac-d39c0861","hasAudioNarration":false,"actualSubdomain":"ac-d39c0861","customDomains":["autclaw.shop"],"gitSource":{"type":"github","owner":"wgwuzhi","repo":"mintlify-starter","deployBranch":"main","isPrivate":false,"contentDirectory":"","mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae1f01a5e19e8213835acdf","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"zh-Hans","tag":"插件开发","count":20},{"language":"zh-Hans","tag":"插件 SDK","count":20},{"language":"en","tag":"Plugin development","count":18},{"language":"en","tag":"Plugin SDK","count":18},{"language":"zh-Hans","tag":"指南","count":9},{"language":"en","tag":"Guides","count":9},{"language":"zh-Hans","tag":"Python 中间件","count":8},{"language":"en","tag":"Python middleware","count":8},{"language":"zh-Hans","tag":"开始使用","count":7},{"language":"zh-Hans","tag":"JavaScript 中间件","count":7},{"language":"en","tag":"Getting started","count":7},{"language":"en","tag":"JavaScript middleware","count":7},{"language":"zh-Hans","tag":"运维","count":2},{"language":"zh-Hans","tag":"适配器","count":2},{"language":"en","tag":"Operations","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/plugin-sdk/python/sender-messages","slug":"/en/plugin-sdk/python/sender-messages","pageMetadata":{"title":"Python Sender message capabilities","description":"Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.","keywords":["Python Sender","replyMixed","media reply","recall message"],"icon":"message-circle","href":"/en/plugin-sdk/python/sender-messages"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Sender`}),` binds to the current runtime context. For message triggers, it represents the current IM, account, chat, and user. For route triggers, it represents the current HTTP request. Cron / fake contexts may not point to a real IM chat.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` middleware `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sender, getSenderID`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sender(getSenderID())`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`read-message-context`,children:`Read message context`}),`\n`,_jsxs(_components.p,{children:[`These methods take no arguments and return fields from the current runtime context. Missing fields usually return an empty string, empty array, or `,_jsx(_components.code,{children:`False`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Method`}),_jsx(_components.th,{children:`Purpose`}),_jsx(_components.th,{children:`Parameters`}),_jsx(_components.th,{children:`Returns`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getImtype()`})}),_jsxs(_components.td,{children:[`Get the current IM type. Cron runs may return `,_jsx(_components.code,{children:`fake`}),`.`]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getUserID()`})}),_jsx(_components.td,{children:`Get the current user ID.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getUserName()`})}),_jsx(_components.td,{children:`Get the current user display name.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getUserAvatarUrl()`})}),_jsx(_components.td,{children:`Get the current user avatar URL.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getChatID()`})}),_jsx(_components.td,{children:`Get the current chat ID; group chats use group ID, private chats are often empty.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getChatName()`})}),_jsx(_components.td,{children:`Get the current chat name.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getGroupName()`})}),_jsxs(_components.td,{children:[`Get the group name. Same as `,_jsx(_components.code,{children:`getChatName()`}),`.`]}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`isAdmin()`})}),_jsx(_components.td,{children:`Check whether the current user is an administrator.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bool`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`isAI()`})}),_jsx(_components.td,{children:`Check whether the message came from an AI trigger context.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bool`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getAIParam()`})}),_jsx(_components.td,{children:`Get the AI parameter.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getMessage()`})}),_jsx(_components.td,{children:`Get the current message text.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getMessageID()`})}),_jsx(_components.td,{children:`Get the current message ID.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`getHistoryMessageIDs(number)`})}),_jsx(_components.td,{children:`Get recent message IDs.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`number`}),`: required count.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`list[str]`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`param(index)`})}),_jsxs(_components.td,{children:[`Read a `,_jsx(_components.code,{children:`rule`}),` regex capture.`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`index`}),` starts at `,_jsx(_components.code,{children:`1`}),`; out-of-range returns an empty string.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`user `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sender.getUserName()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`message `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sender.getMessage()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`first_match `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sender.param(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender.reply(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sent: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Param: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`first_match`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`reply-with-text-and-media`,children:`Reply with text and media`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`reply*`}),` methods reply to the current runtime context. For message triggers, they reply to the current chat. For route triggers, `,_jsx(_components.code,{children:`reply(...)`}),` / `,_jsx(_components.code,{children:`replyMarkdown(...)`}),` can write the route response. A cron `,_jsx(_components.code,{children:`fake`}),` context does not send a real IM reply.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Method`}),_jsx(_components.th,{children:`Purpose`}),_jsx(_components.th,{children:`Parameters`}),_jsx(_components.th,{children:`Returns`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reply(text)`})}),_jsx(_components.td,{children:`Reply with plain text.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`text`}),`: required.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SendReceipt`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replyMarkdown(markdown)`})}),_jsx(_components.td,{children:`Reply with Markdown text. Rendering depends on the adapter.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`markdown`}),`: required.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SendReceipt`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replyImage(source, options=None)`})}),_jsx(_components.td,{children:`Reply with an image.`}),_jsxs(_components.td,{children:[`Image URL, path, base64, or data URI; `,_jsx(_components.code,{children:`options`}),` optional.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SendReceipt`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replyVoice(source, options=None)`})}),_jsx(_components.td,{children:`Reply with voice/audio.`}),_jsxs(_components.td,{children:[`Voice URL or path; `,_jsx(_components.code,{children:`options`}),` optional.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SendReceipt`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replyVideo(source, options=None)`})}),_jsx(_components.td,{children:`Reply with a video.`}),_jsxs(_components.td,{children:[`Video URL or path; `,_jsx(_components.code,{children:`options`}),` optional.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SendReceipt`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replyFile(source, options=None)`})}),_jsx(_components.td,{children:`Reply with a file.`}),_jsxs(_components.td,{children:[`File URL or path; `,_jsx(_components.code,{children:`options`}),` optional.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SendReceipt`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`replyMixed(items, options=None)`})}),_jsx(_components.td,{children:`Reply with structured mixed messages.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`items`}),`: required mixed items.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SendReceipt`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`returnValue(text)`})}),_jsx(_components.td,{children:`Set the runtime return value without sending an IM message.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`text`}),`: required.`]}),_jsx(_components.td,{children:`Runtime result`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender.reply(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Plain text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender.replyMarkdown(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"## Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`- Done\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender.replyImage(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/a.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender.replyVoice(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./voice.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender.replyVideo(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./demo.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender.replyFile(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./report.csv\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"filename\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"report.csv\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mimeType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text/csv\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender.replyMixed([`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Result: \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./result.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"result.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`replyImage(...)`}),` and other current-chat reply methods do not need `,_jsx(_components.code,{children:`imType`}),`, group ID, or user ID. Use `,_jsx(_components.a,{href:`/en/plugin-sdk/python/push`,children:_jsx(_components.code,{children:`push(...)`})}),` or `,_jsx(_components.code,{children:`push*`}),` when you need to choose the target.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`mediaoptions`,children:`MediaOptions`}),`\n`,_jsx(_components.p,{children:`Media reply methods accept an optional dictionary as the second parameter.`}),`\n`,_jsx(ParamField,{path:`options.filename`,type:`string`,id:`param-options-filename`,children:_jsxs(_components.p,{children:[`Display filename. Also accepted as `,_jsx(_components.code,{children:`fileName`}),` or `,_jsx(_components.code,{children:`file_name`}),`.`]})}),`\n`,_jsx(ParamField,{path:`options.mimeType`,type:`string`,id:`param-options-mime-type`,children:_jsxs(_components.p,{children:[`MIME type. Also accepted as `,_jsx(_components.code,{children:`mime_type`}),`.`]})}),`\n`,_jsx(ParamField,{path:`options.timeout`,type:`number`,id:`param-options-timeout`,children:_jsx(_components.p,{children:`Media request timeout. Millisecond values are converted to request timeout.`})}),`\n`,_jsx(Heading,{level:`2`,id:`control-flow`,children:`Control flow`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Method`}),_jsx(_components.th,{children:`Purpose`}),_jsx(_components.th,{children:`Parameters`}),_jsx(_components.th,{children:`Returns`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`setContinue()`})}),_jsx(_components.td,{children:`Continue matching subsequent plugins.`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bool`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`recallMessage(messageid)`})}),_jsx(_components.td,{children:`Recall a message.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`messageid`}),`: message ID.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`SendReceipt`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakIn(content)`})}),_jsx(_components.td,{children:`Re-enter the message pipeline with new text.`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`content`}),`: required.`]}),_jsx(_components.td,{children:`Runtime result`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sender.isAdmin():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sender.setContinue()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sender.reply(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Only administrators can continue.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Wait for user input: `,_jsx(_components.a,{href:`/en/plugin-sdk/python/wait-and-payment`,children:_jsx(_components.code,{children:`Wait for input and payment`})})]}),`\n`,_jsxs(_components.li,{children:[`Download media and read event fields: `,_jsx(_components.a,{href:`/en/plugin-sdk/python/media-files`,children:_jsx(_components.code,{children:`Events, media, and files`})})]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Python Sender message capabilities","description":"Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.","keywords":["Python Sender","replyMixed","media reply","recall message"],"icon":"message-circle","href":"/en/plugin-sdk/python/sender-messages"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Read message context","slug":"read-message-context","depth":2,"children":[]},{"title":"Reply with text and media","slug":"reply-with-text-and-media","depth":2,"children":[]},{"title":"MediaOptions","slug":"mediaoptions","depth":2,"children":[]},{"title":"Control flow","slug":"control-flow","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"ac-d39c0861","siteName":"autClaw Docs","title":"Python Sender message capabilities - autClaw Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"zh-Hans":{"href":"/cn/plugin-sdk/python/sender-messages","matchLevel":1},"en":{"href":"/en/plugin-sdk/python/sender-messages","matchLevel":0}}},"lastModified":"2026-06-03T12:21:11.133Z","gitLastModified":"2026-06-03T12:20:42.000Z","originalFileLocation":"en/plugin-sdk/python/sender-messages.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.\">\u003cmeta data-mint-head name=\"application-name\" content=\"autClaw Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Python Sender message capabilities - autClaw Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"autClaw Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://autclaw.shop/en/plugin-sdk/python/sender-messages\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ac-d39c0861.mintlify.site/_mintlify/api/og/v2?division=Python+middleware\u0026amp;title=Python+Sender+message+capabilities\u0026amp;description=Use+Python+Sender+to+read+user+and+chat+information%2C+reply+with+text%2C+Markdown%2C+media%2C+and+mixed+messages%2C+and+recall+messages.\u0026amp;theme=2b1f124dc8bd6c48b1384b2f\u0026amp;signature=adf3070eb9d5a6c42755533e5060af8fb18d09d75b8b210d11b73d34f05d4ebf\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Python Sender message capabilities - autClaw Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ac-d39c0861.mintlify.site/_mintlify/api/og/v2?division=Python+middleware\u0026amp;title=Python+Sender+message+capabilities\u0026amp;description=Use+Python+Sender+to+read+user+and+chat+information%2C+reply+with+text%2C+Markdown%2C+media%2C+and+mixed+messages%2C+and+recall+messages.\u0026amp;theme=2b1f124dc8bd6c48b1384b2f\u0026amp;signature=adf3070eb9d5a6c42755533e5060af8fb18d09d75b8b210d11b73d34f05d4ebf\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ac-d39c0861/uTasduDZ7Cv0pbqH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"autClaw Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003cmeta data-mint-head name=\"application-name\" content=\"autClaw Docs\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://autclaw.shop/en/plugin-sdk/python/sender-messages\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/plugin-sdk/python/sender-messages.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://autclaw.shop/en/plugin-sdk/python/sender-messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://autclaw.shop/cn/plugin-sdk/python/sender-messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://autclaw.shop/cn/plugin-sdk/python/sender-messages\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://autclaw.shop/#organization\",\"name\":\"autClaw Docs\",\"url\":\"https://autclaw.shop\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ac-d39c0861/KribYGZz2OzluLTs/logo/light.svg?fit=max\u0026auto=format\u0026n=KribYGZz2OzluLTs\u0026q=85\u0026s=7be83e46a445b837c7b0ad78cad87edb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://autclaw.shop#website\",\"name\":\"autClaw Docs\",\"url\":\"https://autclaw.shop\",\"publisher\":{\"@id\":\"https://autclaw.shop/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://autclaw.shop/en/plugin-sdk/python/sender-messages#webpage\",\"url\":\"https://autclaw.shop/en/plugin-sdk/python/sender-messages\",\"name\":\"Python Sender message capabilities\",\"description\":\"Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.\",\"dateModified\":\"2026-06-03T12:20:42.000Z\",\"isPartOf\":{\"@id\":\"https://autclaw.shop#website\"},\"breadcrumb\":{\"@id\":\"https://autclaw.shop/en/plugin-sdk/python/sender-messages#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://autclaw.shop/en/plugin-sdk/python/sender-messages#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Plugin SDK\",\"item\":\"https://autclaw.shop/en/plugin-sdk/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python middleware\",\"item\":\"https://autclaw.shop/en/plugin-sdk/python\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python Sender message capabilities\",\"item\":\"https://autclaw.shop/en/plugin-sdk/python/sender-messages\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://autclaw.shop/en/plugin-sdk/python/sender-messages#article\",\"headline\":\"Python Sender message capabilities\",\"name\":\"Python Sender message capabilities\",\"description\":\"Use Python Sender to read user and chat information, reply with text, Markdown, media, and mixed messages, and recall messages.\",\"url\":\"https://autclaw.shop/en/plugin-sdk/python/sender-messages\",\"mainEntityOfPage\":{\"@id\":\"https://autclaw.shop/en/plugin-sdk/python/sender-messages#webpage\"},\"dateModified\":\"2026-06-03T12:20:42.000Z\",\"keywords\":\"Python Sender, replyMixed, media reply, recall message\",\"publisher\":{\"@id\":\"https://autclaw.shop/#organization\"},\"isPartOf\":{\"@id\":\"https://autclaw.shop#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"autClaw Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"autClaw Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/plugin-sdk/python/sender-messages.md","siteName":"autClaw Docs","nav":{"global":null,"languages":[{"language":"zh-Hans","default":true,"navbar":{"links":[{"href":"https://github.com/WGwuzhi/autClaw","label":"GitHub"}],"primary":{"type":"button","label":"部署 autClaw","href":"/cn/getting-started/deploy"}},"pages":[{"title":"zh-Hans","href":"/cn/plugin-sdk/python/sender-messages"}]},{"language":"en","navbar":{"links":[{"href":"https://github.com/WGwuzhi/autClaw","label":"GitHub"}],"primary":{"type":"button","label":"Deploy autClaw","href":"/en/getting-started/deploy"}},"tabs":[{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":"/en"}]},{"tab":"Plugin development","icon":"puzzle","groups":[{"group":"Plugin SDK","icon":"puzzle","pages":[{"title":"autClaw plugin SDK overview","icon":"puzzle","href":"/en/plugin-sdk/overview"},{"title":"autClaw plugin manifest headers","icon":"file-code","href":"/en/plugin-sdk/manifest"},{"group":"JavaScript middleware","icon":"braces","root":{"title":"autClaw JavaScript plugin reference","icon":"braces","href":"/en/plugin-sdk/javascript"},"expanded":true,"directory":"card","pages":[{"title":"JavaScript plugin context and types","icon":"circle-dot","href":"/en/plugin-sdk/javascript/context"},{"title":"JavaScript Sender message capabilities","icon":"message-circle","href":"/en/plugin-sdk/javascript/sender-messages"},{"title":"JavaScript wait for input and payment","icon":"hourglass","href":"/en/plugin-sdk/javascript/wait-and-payment"},{"title":"JavaScript events, media, and files","icon":"file-down","href":"/en/plugin-sdk/javascript/media-files"},{"title":"JavaScript plugin storage and routes","icon":"database","href":"/en/plugin-sdk/javascript/storage-and-routes"},{"title":"JavaScript plugin proactive push","icon":"send","href":"/en/plugin-sdk/javascript/push"},{"title":"JavaScript tools, Cron, and groups","icon":"wrench","href":"/en/plugin-sdk/javascript/tools-cron-group"}]},{"group":"Python middleware","icon":"code","root":{"title":"autClaw Python plugin reference","icon":"code","href":"/en/plugin-sdk/python"},"expanded":true,"directory":"card","pages":[{"title":"Python plugin context and base types","description":"Import middleware.py, create Sender, and understand common return values in Python plugins.","icon":"circle-dot","href":"/en/plugin-sdk/python/context"},{"title":"Python Sender message capabilities","icon":"message-circle","href":"/en/plugin-sdk/python/sender-messages"},{"title":"Python wait for input and payment","description":"Use listen, input, and waitPay in Python plugins to wait for user input, capture media, and handle payment amount matching.","icon":"hourglass","href":"/en/plugin-sdk/python/wait-and-payment"},{"title":"Python events, media, and files","icon":"file-down","href":"/en/plugin-sdk/python/media-files"},{"title":"Python plugin storage and routes","icon":"database","href":"/en/plugin-sdk/python/storage-and-routes"},{"title":"Python plugin proactive push","icon":"send","href":"/en/plugin-sdk/python/push"},{"title":"Python tools, Cron, and groups","icon":"wrench","href":"/en/plugin-sdk/python/tools-cron-group"},{"title":"Python middleware.py signatures","icon":"file-code","href":"/en/plugin-sdk/python/signatures"}]},{"title":"autClaw plugin media sending","icon":"image","href":"/en/plugin-sdk/media"}]}]}]}]},"basePath":"","title":"Python Sender message capabilities - autClaw Docs","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":[],"chunks":[]}