edit_shared_widget_data()

async Client.edit_shared_widget_data()

Edit public data of a shared widget created by the bot. A shared widget can be edited at most once per second.

Usable by Users Bots
Parameters:
  • widget_id (str) – Unique identifier of the shared widget.

  • public_data (str) – New public data of the widget, 0-1024 bytes; pass an empty string to remove the public data.

  • cache_time (int, optional) – The maximum amount of time in seconds that the public data of the widget may be cached client-side; 5-3600. If omitted, then the current value is kept, which is 30 by default.

Returns:

bool – True on success.

Example

await app.edit_shared_widget_data(widget_id, "new public data", cache_time=60)