teledzik 1.2.0 → 1.2.1

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.
Files changed (2) hide show
  1. package/README.md +75 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
  <img src="https://img.shields.io/npm/v/teledzik.svg?style=flat-square" alt="npm version" />
17
17
  </a>
18
18
  <a href="https://core.telegram.org/bots/api">
19
- <img src="https://img.shields.io/badge/Bot%20API-v10.1+-f36caf.svg?style=flat-square" alt="Bot API Version" />
19
+ <img src="https://img.shields.io/badge/Bot%20API-v10.3+-f36caf.svg?style=flat-square" alt="Bot API Version" />
20
20
  </a>
21
21
  <a href="https://packagephobia.com/result?p=teledzik">
22
22
  <img src="https://flat.badgen.net/packagephobia/install/teledzik" alt="install size" />
@@ -645,6 +645,80 @@ bot.on('inline_query', async (ctx) => {
645
645
 
646
646
  ---
647
647
 
648
+ ## 🚀 Telegram Bot API 10.0 – 10.3 Features (v1.2.0)
649
+
650
+ `teledzik` v1.2.0 includes native support for recent Telegram Bot API updates (v10.0 to v10.3):
651
+
652
+ ### 1. Live Photos
653
+ Send and reply with Live Photos (photo bundled with animated video):
654
+
655
+ ```ts
656
+ // Send live photo to chat
657
+ await ctx.sendLivePhoto(photoInput, videoInput, {
658
+ caption: 'Moments captured live 📸',
659
+ })
660
+
661
+ // Reply to user message with live photo
662
+ await ctx.replyWithLivePhoto(photoInput, videoInput)
663
+ ```
664
+
665
+ ### 2. Ephemeral Messages (Bot API 10.2 & 10.3)
666
+ Send messages and menus that are only visible to a specific user within group chats, and manage their lifecycle:
667
+
668
+ ```ts
669
+ // Send an ephemeral message visible only to a specific user
670
+ await ctx.reply('Confidential panel for admin', {
671
+ ephemeral_message_parameters: {
672
+ receiver_user_id: 12345678,
673
+ },
674
+ })
675
+
676
+ // Edit or delete ephemeral messages
677
+ await ctx.editEphemeralMessageText(messageId, 'Updated secret status')
678
+ await ctx.deleteEphemeralMessage(messageId)
679
+ ```
680
+
681
+ ### 3. Message Streaming & Drafts
682
+ Send intermediate streaming drafts with stop-generation support:
683
+
684
+ ```ts
685
+ // Send streaming draft
686
+ await ctx.sendMessageDraft(draftId, 'Generating response...', {
687
+ can_stop: true,
688
+ keep_on_stop: true,
689
+ })
690
+ ```
691
+
692
+ ### 4. Guest Mode & Join Request WebApps
693
+ Handle queries from users in guest mode or manage community join verifications:
694
+
695
+ ```ts
696
+ // Answer a guest mode query
697
+ await ctx.answerGuestQuery({ text: 'Welcome from guest bot!' })
698
+
699
+ // Send a custom WebApp for chat join verification
700
+ await ctx.telegram.sendChatJoinRequestWebApp(queryId, 'https://example.com/verify')
701
+ ```
702
+
703
+ ### 5. Message Reaction Management
704
+ Clear or manage reactions programmatically:
705
+
706
+ ```ts
707
+ // Clear all reactions from the current message
708
+ await ctx.deleteAllMessageReactions()
709
+
710
+ // Delete a specific user reaction
711
+ await ctx.deleteMessageReaction(messageId, { user_id: targetUserId })
712
+ ```
713
+
714
+ ### 6. Extended Rich Message Builders
715
+ New methods supported in `RichHTMLBuilder`:
716
+ - `expandableBlockQuote(html)`: `<blockquote expandable>...</blockquote>`
717
+ - `document(src, caption)`: `<tg-document src="...">...</tg-document>`
718
+ - `table(rows, { isCompact: true })`: Compact table styling
719
+
720
+ ---
721
+
648
722
  ## Exclusive Teledzik Enhancements
649
723
 
650
724
  ### Native `editRichMessage` & Auto-Sanitizer (v1.0.8+)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teledzik",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Modern Telegram Bot Framework",
5
5
  "keywords": [
6
6
  "telekaf",