@wavezfm/api 0.7.20 → 0.7.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -89,6 +89,24 @@ await client.roomBot.sendMessage('room-id', {
89
89
  });
90
90
  ```
91
91
 
92
+ Embed images keep their natural size by default, capped at the chat width,
93
+ 480 CSS pixels wide and 288 CSS pixels high. Set `imageWidth` to an integer from
94
+ 16 to 480 with `imageUrl` to limit the displayed width; the web client preserves
95
+ its aspect ratio, never upscales it, and fits it within the available chat space.
96
+ Clicking the image still opens the original full-size preview.
97
+
98
+ ```ts
99
+ await client.roomBot.sendMessage('room-id', {
100
+ content: '@Alice is away. Back soon.',
101
+ embed: {
102
+ title: 'AFK',
103
+ description: '@Alice is away. Back soon.',
104
+ imageUrl: 'https://images.example.com/afk.png',
105
+ imageWidth: 64,
106
+ },
107
+ });
108
+ ```
109
+
92
110
  Bots with `send_chat` permission can upload a chat image with
93
111
  `client.roomBot.uploadImage(roomId, imageBlob, 'photo.png')`. It accepts a `Blob`
94
112
  or an existing `FormData` containing the `image` field; a `FormData` may also
package/dist/types.d.ts CHANGED
@@ -986,6 +986,8 @@ export interface RoomBotChatEmbed {
986
986
  description?: string;
987
987
  color?: string;
988
988
  imageUrl?: string;
989
+ /** Maximum display width in CSS pixels (integer 16-480); requires imageUrl. Images are not upscaled. */
990
+ imageWidth?: number;
989
991
  fields?: Array<{
990
992
  name: string;
991
993
  value: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavezfm/api",
3
- "version": "0.7.20",
3
+ "version": "0.7.21",
4
4
  "description": "Official JavaScript/TypeScript API client for WavezFM.",
5
5
  "homepage": "https://docs.wavez.fm/docs",
6
6
  "repository": {