@wavezfm/api 0.7.19 → 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
@@ -198,6 +198,8 @@ export interface BadgeAssignment {
198
198
  [key: string]: unknown;
199
199
  }
200
200
  export interface RoomActiveUser {
201
+ /** Approximate country detected from the current connection IP, never the profile flag. */
202
+ connectionCountryCode?: string | null;
201
203
  id: string;
202
204
  username: string;
203
205
  displayUsername?: string | null;
@@ -984,6 +986,8 @@ export interface RoomBotChatEmbed {
984
986
  description?: string;
985
987
  color?: string;
986
988
  imageUrl?: string;
989
+ /** Maximum display width in CSS pixels (integer 16-480); requires imageUrl. Images are not upscaled. */
990
+ imageWidth?: number;
987
991
  fields?: Array<{
988
992
  name: string;
989
993
  value: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavezfm/api",
3
- "version": "0.7.19",
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": {