@@ -168,7 +168,7 @@ Returns the `eventId` of the sent message.
168168
169169#### Sending attachments
170170
171- The bot framework supports three types of attachments with automatic validation and encryption.
171+ The bot framework supports four types of attachments with automatic validation and encryption.
172172
173173##### Image Attachments from URLs
174174
@@ -186,33 +186,29 @@ await bot.sendMessage(channelId, message, {
186186})
187187```
188188
189- ##### Link Attachments
189+ ##### Miniapp Attachments
190190
191- Send link attachments. This is the recommended way to share miniapps, frames, and any web content .
191+ You can use it to send a miniapp. It will be rendered in the message as a miniapp .
192192
193193``` ts
194194await bot .sendMessage (channelId , " Check this out!" , {
195195 attachments: [{
196- type: ' link ' ,
196+ type: ' miniapp ' ,
197197 url: ' https://example.com/miniapp'
198198 }]
199199})
200200```
201201
202- You can send multiple link attachments in a single message:
202+ ##### Link Attachments
203+
204+ You can use it to send any link.
203205
204206``` ts
205- await bot .sendMessage (channelId , " Useful resources:" , {
206- attachments: [
207- { type: ' link' , url: ' https://example.com/miniapp' },
208- { type: ' link' , url: ' https://docs.towns.com' },
209- { type: ' link' , url: ' https://github.com/townsprotocol' }
210- ]
207+ await bot .sendMessage (channelId , " Check this out!" , {
208+ attachments: [{ type: ' link' , url: ' https://docs.towns.com' }]
211209})
212210```
213211
214- Returns the ` eventId ` of the sent message.
215-
216212##### Chunked Media Attachments
217213
218214Send binary data (videos, screenshots, generated images). Framework automatically encrypts and chunks (1.2MB per chunk).
0 commit comments