telegem 3.0.6 → 3.1.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG +92 -12
- data/CODE_OF_CONDUCT.md +13 -0
- data/Contributing.md +125 -517
- data/Readme.md +10 -61
- data/Starts_HallofFame.md +27 -21
- data/lib/api/client.rb +63 -56
- data/lib/core/bot.rb +32 -22
- data/lib/core/context.rb +47 -18
- data/lib/core/rate_limit.rb +100 -0
- data/lib/core/scene.rb +110 -43
- data/lib/plugins/file_extract.rb +97 -0
- data/lib/session/scene_middleware.rb +22 -0
- data/lib/telegem.rb +3 -1
- metadata +26 -84
- data/docs-src/Bot-registration_.PNG +0 -0
- data/docs-src/bot.md +0 -464
- data/docs-src/context|ctx|.md +0 -531
- data/docs-src/ctx.md +0 -399
- data/docs-src/getting-started.md +0 -328
- data/docs-src/keyboard_inline.md +0 -413
- data/docs-src/scene.md +0 -509
- data/docs-src/webhook.md +0 -341
- /data/{docs-src → lib/plugins}/.gitkeep +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ef63701f663694078c74cc777b733f9d7fd8c20f9d8309e12fdcbea6e979911
|
|
4
|
+
data.tar.gz: 29a744115f81510dfd0f2f082f7990cb67e63fafb976e69efda80caca9215de7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2e45b5fad65c6637eee3f982832eb4d227904e85e0efa7bf40315e69e69267d867aa8b6e2ea9e5eef00f5274c07697dee42b213bd75286887e2e21845ac9c25
|
|
7
|
+
data.tar.gz: 6e34ea4d896573e99ce30ecccb3fad123e43e3f60517c8aa3a5a779515428105dfc64dcf762cdb640878725ecbda8beba82d46f5aebaa104acbc8c5211c5622d
|
data/CHANGELOG
CHANGED
|
@@ -1,15 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
Telegem Changelog
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
- **Critical**: Fixed `NoMethodError: undefined method 'wait'` for HTTPX responses
|
|
5
|
-
- Unified HTTPX client usage across all API methods
|
|
6
|
-
- Proper async/await pattern implementation
|
|
7
|
-
- Improved error handling for network timeouts
|
|
3
|
+
v3.1.1 (current)
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
- `API::Client#call` now uses async/await instead of blocking `.wait`
|
|
11
|
-
- Better timeout handling for all Telegram API calls
|
|
5
|
+
🚀 New Features
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
· FileExtractor Plugin: New plugin for extracting content from various file types (PDF, JSON, HTML, TXT)
|
|
8
|
+
· Async File Download: Added download method to API client for downloading Telegram files
|
|
9
|
+
· Context File Helpers: Added download_file, download_photo, download_document methods to Context
|
|
10
|
+
· Extended File Support: Plugin supports PDF text extraction, JSON parsing, HTML/raw text processing
|
|
11
|
+
· Async/Sync Dual Mode: All file operations available in both sync (download) and async (download!) modes
|
|
12
|
+
|
|
13
|
+
v3.1.0
|
|
14
|
+
|
|
15
|
+
· BREAKING: Rewrote polling system to prevent duplicate messages
|
|
16
|
+
· Fixed thread deadlock in async polling loop
|
|
17
|
+
· Added scene_middleware.rb for scene-based conversations
|
|
18
|
+
· Improved MemoryStore with TTL and thread safety
|
|
19
|
+
· Enhanced keyboard markup builder with web_app support
|
|
20
|
+
· Added message reaction and chat boost update types
|
|
21
|
+
· Fixed callback query handling for inline keyboards
|
|
22
|
+
|
|
23
|
+
v3.0.0
|
|
24
|
+
|
|
25
|
+
· BREAKING: Complete async rewrite with async gem
|
|
26
|
+
· New HTTP client using HTTPX with proper async/await pattern
|
|
27
|
+
· Added scene system for multi-step conversations
|
|
28
|
+
· Middleware composer system for plugin architecture
|
|
29
|
+
· Type system with dynamic accessors for Telegram objects
|
|
30
|
+
· Session management with memory store
|
|
31
|
+
· Rate limiting middleware
|
|
32
|
+
· File upload support via multipart forms
|
|
33
|
+
|
|
34
|
+
v2.0.0
|
|
35
|
+
|
|
36
|
+
· BREAKING: Ruby 3.0+ requirement
|
|
37
|
+
· Added webhook support with Rack middleware
|
|
38
|
+
· Inline query and callback query handlers
|
|
39
|
+
· Location, contact, and poll answer handlers
|
|
40
|
+
· Keyboard markup helpers (Telegem::Markup)
|
|
41
|
+
· Improved error handling with custom error classes
|
|
42
|
+
· Logging integration with configurable loggers
|
|
43
|
+
|
|
44
|
+
v1.5.0
|
|
45
|
+
|
|
46
|
+
· Added command argument parsing (ctx.command_args)
|
|
47
|
+
· Message entity parsing (mentions, hashtags, bot commands)
|
|
48
|
+
· Chat member update handlers
|
|
49
|
+
· Pre-checkout and shipping query support
|
|
50
|
+
· File download helper methods
|
|
51
|
+
· Context helper methods for common API calls
|
|
52
|
+
|
|
53
|
+
v1.0.0
|
|
54
|
+
|
|
55
|
+
· Stable API release
|
|
56
|
+
· Message handlers with text pattern matching
|
|
57
|
+
· Command handlers with regex support
|
|
58
|
+
· Basic context object with chat/message accessors
|
|
59
|
+
· Simple API client with error handling
|
|
60
|
+
· Polling and webhook modes
|
|
61
|
+
· Configuration options for timeout and limits
|
|
62
|
+
|
|
63
|
+
v0.5.0
|
|
64
|
+
|
|
65
|
+
· Added callback query support
|
|
66
|
+
· Inline keyboard builder
|
|
67
|
+
· Message editing and deletion helpers
|
|
68
|
+
· Media sending methods (photo, document, audio, video)
|
|
69
|
+
· Chat action methods (typing, upload indicators)
|
|
70
|
+
|
|
71
|
+
v0.3.0
|
|
72
|
+
|
|
73
|
+
· Middleware system with bot.use
|
|
74
|
+
· Session management foundation
|
|
75
|
+
· Basic rate limiting
|
|
76
|
+
· Command filtering by chat type
|
|
77
|
+
· Improved logging with debug levels
|
|
78
|
+
|
|
79
|
+
v0.2.0
|
|
80
|
+
|
|
81
|
+
· Basic polling implementation
|
|
82
|
+
· Message type detection (text, photo, document)
|
|
83
|
+
· Command parsing with arguments
|
|
84
|
+
· Simple reply methods
|
|
85
|
+
· Error handling for API calls
|
|
86
|
+
|
|
87
|
+
v0.1.0 (Initial Release)
|
|
88
|
+
|
|
89
|
+
· Basic Telegram Bot API wrapper
|
|
90
|
+
· Send/receive messages
|
|
91
|
+
· Simple command handling
|
|
92
|
+
· Minimal dependencies (just httparty)
|
|
93
|
+
· Support for basic message types
|
|
94
|
+
|
|
95
|
+
---
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
We pledge to make participation in our project a harassment-free experience for everyone...
|
|
5
|
+
|
|
6
|
+
## Our Standards
|
|
7
|
+
Examples of behavior that contributes to a positive environment...
|
|
8
|
+
|
|
9
|
+
## Enforcement
|
|
10
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported...
|
|
11
|
+
|
|
12
|
+
## Attribution
|
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org)...
|