@wavezfm/api 0.7.20 → 0.7.22
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 +18 -0
- package/dist/types.d.ts +6 -0
- package/package.json +1 -1
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
|
@@ -450,6 +450,10 @@ export interface PlaylistJsonTrack {
|
|
|
450
450
|
sourceId: string;
|
|
451
451
|
title: string;
|
|
452
452
|
artist: string;
|
|
453
|
+
/** Omitted in legacy backups: preserve title; null: use the provider title. */
|
|
454
|
+
customTitle?: string | null;
|
|
455
|
+
/** Omitted in legacy backups: preserve artist; null: use the provider artist. */
|
|
456
|
+
customArtist?: string | null;
|
|
453
457
|
durationMs: number;
|
|
454
458
|
thumbnailUrl: string | null;
|
|
455
459
|
isLive: boolean;
|
|
@@ -986,6 +990,8 @@ export interface RoomBotChatEmbed {
|
|
|
986
990
|
description?: string;
|
|
987
991
|
color?: string;
|
|
988
992
|
imageUrl?: string;
|
|
993
|
+
/** Maximum display width in CSS pixels (integer 16-480); requires imageUrl. Images are not upscaled. */
|
|
994
|
+
imageWidth?: number;
|
|
989
995
|
fields?: Array<{
|
|
990
996
|
name: string;
|
|
991
997
|
value: string;
|