sender.getMediaItems(), file downloads, and group member lists. When handling user-uploaded files, use standardized MediaItem values instead of building platform-specific download URLs.
Event methods
| Method | Purpose | Parameters | Returns |
|---|---|---|---|
getPluginName() | Get the current plugin title; falls back to plugin name. | None | str |
getPluginVersion() | Get the current plugin version. | None | str |
getEventType() | Get the current event type. | None | str |
setEventType(eventType) | Set the current runtime event type. | eventType: required. | bool |
getEventData() | Get current event data. Returns {} when missing. | None | JSON-like |
setEventData(eventData) | Set current event data. | eventData: any JSON-like value. | bool |
getMediaItems() | Get media from the current event or latest waited input. | None | list[dict] |
getMediaItems()
getMediaItems() first returns media captured by the latest listen(...) / input(...). If no waited-input media exists, it returns media_items / mediaItems from the current event data.
fileDownload(url, path=None)
Download a remote URL, base64://..., or data URI to the local file directory.
downloadAdapterFile(file, options=None, timeout=None)
Download a file item received by an adapter. You can pass a MediaItem returned by sender.getMediaItems() directly.
download_adapter_file(...) is the Python alias of downloadAdapterFile(...).
getGroupMemberList(group_id_or_options=None, options=None, timeout=None)
Get the group member list. Pass a group ID or an options dictionary.
get_group_member_list(...) is the Python alias of getGroupMemberList(...).
Next steps
- Media sources and mixed syntax:
Media sending - Store download results:
Storage and routes