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.
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, orFalse.
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.
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
Next steps
- Wait for user input:
Wait for input and payment - Download media and read event fields:
Events, media, and files