telegram-badge 1.2.3 → 1.3.0

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.ar.md ADDED
@@ -0,0 +1,256 @@
1
+ # 🛡️ مولد شارات مجموعات تيليجرام
2
+
3
+ [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md) | [🇹🇭 ไทย](README.th.md) | [🇸🇦 العربية](README.ar.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md)
4
+
5
+ [![Build Status](https://github.com/chatman-media/telegram-badge/workflows/CI/badge.svg)](https://github.com/chatman-media/telegram-badge/actions)
6
+ [![npm version](https://img.shields.io/npm/v/telegram-badge.svg)](https://www.npmjs.com/package/telegram-badge)
7
+ [![npm bundle size](https://img.shields.io/bundlephobia/minzip/telegram-badge)](https://bundlephobia.com/package/telegram-badge)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg)](https://www.typescriptlang.org/)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+
11
+ [![GitHub stars](https://img.shields.io/github/stars/chatman-media/telegram-badge?style=social)](https://github.com/chatman-media/telegram-badge)
12
+ [![dev.to](https://img.shields.io/badge/dev.to-Article-0A0A0A.svg?style=flat&logo=dev.to)](https://dev.to/chatman-media/show-your-telegram-group-member-count-in-github-readme-46pl)
13
+ [![X (Twitter)](https://img.shields.io/badge/Tweet-1DA1F2.svg?style=flat&logo=x&logoColor=white)](https://x.com/chatman_media/status/1947399700795244694)
14
+
15
+ هذا المشروع ي generates شارات SVG بعدد أعضاء مجموعة التيليجرام الحالي الخاص بك. مثالي لعرض نشاط المجتمع في ملفات README على GitHub أو على المواقع.
16
+
17
+ ## 🚀 البدء السريع
18
+
19
+ فقط استخدم معلمات URL لإنشاء شارات لأي قناة أو مجموعة تيليجرام:
20
+
21
+ ```
22
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
23
+ ```
24
+
25
+ ![Telegram Group Members](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat)
26
+
27
+ ---
28
+
29
+ ## 📦 المكدس التكنولوجي
30
+
31
+ - Node.js / TypeScript
32
+ - Telegram Bot API
33
+ - Vercel (Serverless API)
34
+ - Jest للاختبار
35
+
36
+ ---
37
+
38
+ ## 🧩 الاستخدام
39
+
40
+ ### الطريقة الأساسية: معلمات URL (لا يتطلب إعداد!)
41
+
42
+ فقط أضف معرف قناة/مجموعة التيليجرام الخاص بك إلى URL:
43
+
44
+ ```markdown
45
+ ![Telegram Badge](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel)
46
+ ```
47
+
48
+ هذا كل شيء! لا حاجة للنشر، لا حاجة لرمز البوت.
49
+
50
+ ### الطريقة البديلة: الاستضافة الذاتية
51
+
52
+ للمستخدمين المتقدمين الذين يرغبون في استضافة نسختهم الخاصة:
53
+
54
+ #### 1. المتطلبات الأساسية
55
+ - رمز بوت التيليجرام (أنشئه عبر [@BotFather](https://t.me/botfather))
56
+ - حساب Vercel (أو أي استضافة Node.js)
57
+
58
+ #### 2. النشر على Vercel
59
+
60
+ [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fchatman-media%2Ftelegram-badge)
61
+
62
+ قم بتعيين متغيرات البيئة:
63
+ - `BOT_TOKEN`: رمز بوت التيليجرام الخاص بك
64
+ - `CHAT_ID`: معرف الدردشة الافتراضي (اختياري إذا كنت تستخدم معلمات URL)
65
+
66
+ #### 3. التطوير المحلي
67
+
68
+ ```bash
69
+ git clone https://github.com/chatman-media/telegram-badge.git
70
+ cd telegram-badge
71
+ npm install
72
+
73
+ # إنشاء ملف .env
74
+ echo "BOT_TOKEN=your_bot_token" > .env
75
+ echo "CHAT_ID=@your_channel" >> .env
76
+
77
+ npm run dev
78
+ ```
79
+
80
+ ### 🎨 معلمات التنسيق
81
+
82
+ يمكنك تخصيص مظهر الشارة باستخدام المعلمات التالية:
83
+
84
+ | المعلمة | الوصف | القيمة الافتراضية |
85
+ |-----------|-------------|------------------------|
86
+ | `channelId` | معرف أو اسم مستخدم دردشة التيليجرام (مثال: `@timelinestudiochat`) | من البيئة |
87
+ | `style` | نمط الشارة | `flat` |
88
+ | `label` | نص التسمية | `Telegram` |
89
+ | `color` | لون الشارة الرئيسي | `2AABEE` (لون التيليجرام) |
90
+ | `labelColor` | لون التسمية | `555555` |
91
+ | `logo` | إظهار شعار التيليجرام | `true` |
92
+
93
+ #### الأنماط المتاحة:
94
+
95
+ - `flat` - نمط مسطح (افتراضي)
96
+ - `plastic` - نمط بلاستيكي مع تدرج
97
+ - `flat-square` - نمط مسطح مربع بدون زوايا مستديرة
98
+ - `for-the-badge` - نمط عريض مع أحرف كبيرة
99
+ - `social` - نمط اجتماعي GitHub
100
+
101
+ #### أمثلة:
102
+
103
+ الشارة القياسية (نمط flat):
104
+ ```
105
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
106
+ ```
107
+ ![Flat](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat)
108
+
109
+ شارة بنمط plastic:
110
+ ```
111
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=plastic
112
+ ```
113
+ ![Plastic](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=plastic)
114
+
115
+ شارة بنمط flat-square:
116
+ ```
117
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=flat-square
118
+ ```
119
+ ![Flat-Square](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=flat-square)
120
+
121
+ شارة بنمط for-the-badge:
122
+ ```
123
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge
124
+ ```
125
+ ![For-The-Badge](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=for-the-badge)
126
+
127
+ شارة بنمط social:
128
+ ```
129
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=social
130
+ ```
131
+ ![Social](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=social)
132
+
133
+ شارة بتسمية ولون مخصصين:
134
+ ```
135
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&label=انضم%20للدردشة&color=00FF00
136
+ ```
137
+ ![Custom](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&label=انضم%20للدردشة&color=00FF00)
138
+
139
+ شارة مخصصة بالكامل:
140
+ ```
141
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&label=المجتمع&color=FF5733&labelColor=1A1A1A
142
+ ```
143
+ ![Full Custom](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=for-the-badge&label=المجتمع&color=FF5733&labelColor=1A1A1A)
144
+
145
+ شارة بدون شعار:
146
+ ```
147
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&logo=false
148
+ ```
149
+ ![No Logo](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&logo=false)
150
+
151
+ شارة لقناة محددة:
152
+ ```
153
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
154
+ ```
155
+
156
+ شارة بتنسيق مخصص:
157
+ ```
158
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&color=FF5733
159
+ ```
160
+
161
+ ## ✨ المميزات
162
+
163
+ - 👥 عرض عدد الأعضاء في الوقت الفعلي
164
+ - 🔗 معلمات URL المباشرة - لا يتطلب إعداد!
165
+ - 🎨 تخصيص كامل لمظهر الشارة
166
+ - 🔒 الاستضافة الذاتية الاختيارية مع تخزين آمن للرموز
167
+ - ⚡ التخزين المؤقت المحسّن للتحميل السريع
168
+ - 🛡️ معالجة الأخطاء مع رسائل إعلامية
169
+ - 🆓 مجاني الاستخدام
170
+ - 📡 يمكن توسيعه لعرض النشاط/عدد الرسائل
171
+ - 🧪 مجموعة اختبار شاملة مع TypeScript
172
+
173
+ ## 🔧 استخدام API
174
+
175
+ ### كحزمة npm:
176
+
177
+ ```bash
178
+ npm install telegram-badge
179
+ ```
180
+
181
+ ```typescript
182
+ import badgeHandler from 'telegram-badge';
183
+
184
+ // استخدم في دالة الخادم الخاصة بك
185
+ export default badgeHandler;
186
+ ```
187
+
188
+ ### مكالمات API المباشرة:
189
+
190
+ ```typescript
191
+ GET /api/telegram-badge?style=flat&label=الأعضاء&color=2AABEE&labelColor=555555
192
+ ```
193
+
194
+ ## 🧪 الاختبار
195
+
196
+ تشغيل مجموعة الاختبارات:
197
+
198
+ ```bash
199
+ npm test
200
+ ```
201
+
202
+ ## 🤝 المساهمة
203
+
204
+ 1. قم بعمل Fork للمستودع
205
+ 2. أنشئ فرع ميزة (`git checkout -b feature/amazing-feature`)
206
+ 3. قم بتثبيت تغييراتك (`git commit -m 'Add some amazing feature'`)
207
+ 4. ادفع الفرع (`git push origin feature/amazing-feature`)
208
+ 5. افتح طلب سحب (Pull Request)
209
+
210
+ ## اشترك
211
+
212
+ [![TikTok](https://img.shields.io/badge/TikTok-000000?style=for-the-badge&logo=tiktok&logoColor=white&labelColor=1c1917)](https://www.tiktok.com/@chatman.media)
213
+ [![twitch](https://img.shields.io/badge/Twitch-9146FF?style=for-the-badge&logo=twitch&logoColor=white&labelColor=1c1917)](https://www.twitch.tv/chatman1984)
214
+ [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white&labelColor=1c1917)](https://www.youtube.com/@chatman-media)
215
+ [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white&labelColor=1c1917)](https://t.me/alexanderkireyev)
216
+ [![X](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white&labelColor=1c1917)](https://x.com/chatman_media)
217
+
218
+ ## الدعم 💝🚀
219
+
220
+ - **BTC:** 14s9Y9Rb2CUWHSAatiQMhfkpx1MWXofUzw
221
+ - **TON:** UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
222
+ - **NOT:** UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
223
+ - **ETH:** 0x286D65151b622dCC16624cEd8463FDa45585fd60
224
+
225
+ <div align="center">
226
+ <table>
227
+ <tr>
228
+ <td><img src="public/btc.png" alt="BTC" height="185" /></td>
229
+ <td><img src="public/ton.png" alt="TON" height="185" /></td>
230
+ <td><img src="public/not.png" alt="NOT" height="185" /></td>
231
+ <td><img src="public/eth.png" alt="ETH" height="185" /></td>
232
+ </tr>
233
+ </table>
234
+ </div>
235
+
236
+ ## تاريخ النجوم
237
+
238
+ <a href="https://www.star-history.com/#chatman-media/telegram-badge&Date">
239
+ <picture>
240
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date&theme=dark" />
241
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
242
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
243
+ </picture>
244
+ </a>
245
+
246
+ ## نشاط المستودع
247
+
248
+ ![Alt](https://repobeats.axiom.co/api/embed/74975e0da934ce1756e69f04fe68f2b026a77aee.svg "Repobeats analytics image")
249
+
250
+ ## 📜 الرخصة
251
+
252
+ هذا المشروع مرخّص بموجب رخصة MIT - راجع ملف [LICENSE](LICENSE) لمزيد من التفاصيل.
253
+
254
+ ---
255
+
256
+ صنع بحب من قبل [Chatman Media](https://github.com/chatman-media)
package/README.ja.md ADDED
@@ -0,0 +1,256 @@
1
+ # 🛡️ Telegramグループバッジジェネレーター
2
+
3
+ [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md) | [🇹🇭 ไทย](README.th.md) | [🇸🇦 العربية](README.ar.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md)
4
+
5
+ [![Build Status](https://github.com/chatman-media/telegram-badge/workflows/CI/badge.svg)](https://github.com/chatman-media/telegram-badge/actions)
6
+ [![npm version](https://img.shields.io/npm/v/telegram-badge.svg)](https://www.npmjs.com/package/telegram-badge)
7
+ [![npm bundle size](https://img.shields.io/bundlephobia/minzip/telegram-badge)](https://bundlephobia.com/package/telegram-badge)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg)](https://www.typescriptlang.org/)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+
11
+ [![GitHub stars](https://img.shields.io/github/stars/chatman-media/telegram-badge?style=social)](https://github.com/chatman-media/telegram-badge)
12
+ [![dev.to](https://img.shields.io/badge/dev.to-Article-0A0A0A.svg?style=flat&logo=dev.to)](https://dev.to/chatman-media/show-your-telegram-group-member-count-in-github-readme-46pl)
13
+ [![X (Twitter)](https://img.shields.io/badge/Tweet-1DA1F2.svg?style=flat&logo=x&logoColor=white)](https://x.com/chatman_media/status/1947399700795244694)
14
+
15
+ このプロジェクトは、Telegramグループの現在のメンバー数を表示するSVGバッジを生成します。GitHubのREADMEファイルやウェブサイトでコミュニティの活動を表示するのに最適です。
16
+
17
+ ## 🚀 クイックスタート
18
+
19
+ URLパラメータを使用して、任意のTelegramチャンネルまたはグループのバッジを生成するだけです:
20
+
21
+ ```
22
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
23
+ ```
24
+
25
+ ![Telegram Group Members](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat)
26
+
27
+ ---
28
+
29
+ ## 📦 技術スタック
30
+
31
+ - Node.js / TypeScript
32
+ - Telegram Bot API
33
+ - Vercel(サーバーレスAPI)
34
+ - Jest(テスト用)
35
+
36
+ ---
37
+
38
+ ## 🧩 使用方法
39
+
40
+ ### プライマリ方法:URLパラメータ(セットアップ不要!)
41
+
42
+ Telegramチャンネル/グループIDをURLに追加するだけです:
43
+
44
+ ```markdown
45
+ ![Telegram Badge](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel)
46
+ ```
47
+
48
+ それだけ!デプロイも、ボットトークンの設定も不要です。
49
+
50
+ ### 代替方法:セルフホストデプロイメント
51
+
52
+ 独自のインスタンスをホストしたい上級ユーザーの場合:
53
+
54
+ #### 1. 前提条件
55
+ - Telegramボットトークン([@BotFather](https://t.me/botfather)経由で作成)
56
+ - Vercelアカウント(または任意のNode.jsホスティング)
57
+
58
+ #### 2. Vercelへのデプロイ
59
+
60
+ [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fchatman-media%2Ftelegram-badge)
61
+
62
+ 環境変数を設定:
63
+ - `BOT_TOKEN`:Telegramボットトークン
64
+ - `CHAT_ID`:デフォルトチャットID(URLパラメータを使用する場合はオプション)
65
+
66
+ #### 3. ローカル開発
67
+
68
+ ```bash
69
+ git clone https://github.com/chatman-media/telegram-badge.git
70
+ cd telegram-badge
71
+ npm install
72
+
73
+ # .envファイルを作成
74
+ echo "BOT_TOKEN=your_bot_token" > .env
75
+ echo "CHAT_ID=@your_channel" >> .env
76
+
77
+ npm run dev
78
+ ```
79
+
80
+ ### 🎨 スタイリングパラメータ
81
+
82
+ 以下のパラメータを使用してバッジの外観をカスタマイズできます:
83
+
84
+ | パラメータ | 説明 | デフォルト値 |
85
+ |-----------|-------------|---------------|
86
+ | `channelId` | TelegramチャットIDまたはユーザー名(例:`@timelinestudiochat`) | 環境変数から |
87
+ | `style` | バッジスタイル | `flat` |
88
+ | `label` | ラベルテキスト | `Telegram` |
89
+ | `color` | メインバッジカラー | `2AABEE`(Telegramカラー) |
90
+ | `labelColor` | ラベルカラー | `555555` |
91
+ | `logo` | Telegramロゴを表示 | `true` |
92
+
93
+ #### 利用可能なスタイル:
94
+
95
+ - `flat` - フラットスタイル(デフォルト)
96
+ - `plastic` - グラデーション付きプラスチックスタイル
97
+ - `flat-square` - 角丸なしフラットスタイル
98
+ - `for-the-badge` - 大文字付きワイドスタイル
99
+ - `social` - GitHubソーシャルスタイル
100
+
101
+ #### 使用例:
102
+
103
+ 標準バッジ(フラットスタイル):
104
+ ```
105
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
106
+ ```
107
+ ![Flat](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat)
108
+
109
+ プラスチックスタイルバッジ:
110
+ ```
111
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=plastic
112
+ ```
113
+ ![Plastic](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=plastic)
114
+
115
+ フラットスクエアスタイルバッジ:
116
+ ```
117
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=flat-square
118
+ ```
119
+ ![Flat-Square](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=flat-square)
120
+
121
+ for-the-badgeスタイルバッジ:
122
+ ```
123
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge
124
+ ```
125
+ ![For-The-Badge](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=for-the-badge)
126
+
127
+ ソーシャルスタイルバッジ:
128
+ ```
129
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=social
130
+ ```
131
+ ![Social](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=social)
132
+
133
+ カスタムラベルとカラーのバッジ:
134
+ ```
135
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&label=チャットに参加&color=00FF00
136
+ ```
137
+ ![Custom](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&label=チャットに参加&color=00FF00)
138
+
139
+ 完全カスタマイズバッジ:
140
+ ```
141
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&label=コミュニティ&color=FF5733&labelColor=1A1A1A
142
+ ```
143
+ ![Full Custom](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=for-the-badge&label=コミュニティ&color=FF5733&labelColor=1A1A1A)
144
+
145
+ ロゴなしバッジ:
146
+ ```
147
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&logo=false
148
+ ```
149
+ ![No Logo](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&logo=false)
150
+
151
+ 特定チャンネル用バッジ:
152
+ ```
153
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
154
+ ```
155
+
156
+ カスタムスタイリングバッジ:
157
+ ```
158
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&color=FF5733
159
+ ```
160
+
161
+ ## ✨ 機能
162
+
163
+ - 👥 リアルタイムメンバー数表示
164
+ - 🔗 直接URLパラメータ - セットアップ不要!
165
+ - 🎨 バッジ外観の完全カスタマイズ
166
+ - 🔒 安全なトークン保存を備えたオプションのセルフホスティング
167
+ - ⚡ 高速読み込みのための最適化されたキャッシング
168
+ - 🛡️ 有益なメッセージによるエラーハンドリング
169
+ - 🆓 無料使用
170
+ - 📡 アクティビティ/メッセージ数表示に拡張可能
171
+ - 🧪 TypeScriptによる包括的テストスイート
172
+
173
+ ## 🔧 APIの使用
174
+
175
+ ### npmパッケージとして:
176
+
177
+ ```bash
178
+ npm install telegram-badge
179
+ ```
180
+
181
+ ```typescript
182
+ import badgeHandler from 'telegram-badge';
183
+
184
+ // サーバーレス関数で使用
185
+ export default badgeHandler;
186
+ ```
187
+
188
+ ### 直接API呼び出し:
189
+
190
+ ```typescript
191
+ GET /api/telegram-badge?style=flat&label=メンバー&color=2AABEE&labelColor=555555
192
+ ```
193
+
194
+ ## 🧪 テスト
195
+
196
+ テストスイートを実行:
197
+
198
+ ```bash
199
+ npm test
200
+ ```
201
+
202
+ ## 🤝 貢献
203
+
204
+ 1. リポジトリをフォークする
205
+ 2. 機能ブランチを作成する(`git checkout -b feature/amazing-feature`)
206
+ 3. 変更をコミットする(`git commit -m 'Add some amazing feature'`)
207
+ 4. ブランチにプッシュする(`git push origin feature/amazing-feature`)
208
+ 5. Pull Request を作成する
209
+
210
+ ## 購読
211
+
212
+ [![TikTok](https://img.shields.io/badge/TikTok-000000?style=for-the-badge&logo=tiktok&logoColor=white&labelColor=1c1917)](https://www.tiktok.com/@chatman.media)
213
+ [![twitch](https://img.shields.io/badge/Twitch-9146FF?style=for-the-badge&logo=twitch&logoColor=white&labelColor=1c1917)](https://www.twitch.tv/chatman1984)
214
+ [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white&labelColor=1c1917)](https://www.youtube.com/@chatman-media)
215
+ [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white&labelColor=1c1917)](https://t.me/alexanderkireyev)
216
+ [![X](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white&labelColor=1c1917)](https://x.com/chatman_media)
217
+
218
+ ## サポート 💝🚀
219
+
220
+ - **BTC:** 14s9Y9Rb2CUWHSAatiQMhfkpx1MWXofUzw
221
+ - **TON:** UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
222
+ - **NOT:** UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
223
+ - **ETH:** 0x286D65151b622dCC16624cEd8463FDa45585fd60
224
+
225
+ <div align="center">
226
+ <table>
227
+ <tr>
228
+ <td><img src="public/btc.png" alt="BTC" height="185" /></td>
229
+ <td><img src="public/ton.png" alt="TON" height="185" /></td>
230
+ <td><img src="public/not.png" alt="NOT" height="185" /></td>
231
+ <td><img src="public/eth.png" alt="ETH" height="185" /></td>
232
+ </tr>
233
+ </table>
234
+ </div>
235
+
236
+ ## スター履歴
237
+
238
+ <a href="https://www.star-history.com/#chatman-media/telegram-badge&Date">
239
+ <picture>
240
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date&theme=dark" />
241
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
242
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
243
+ </picture>
244
+ </a>
245
+
246
+ ## リポジトリのアクティビティ
247
+
248
+ ![Alt](https://repobeats.axiom.co/api/embed/74975e0da934ce1756e69f04fe68f2b026a77aee.svg "Repobeats analytics image")
249
+
250
+ ## 📜 ライセンス
251
+
252
+ このプロジェクトは MIT ライセンスの下で提供されています。詳細は [LICENSE](LICENSE) を参照してください。
253
+
254
+ ---
255
+
256
+ [Chatman Media](https://github.com/chatman-media) によって ❤️ を込めて作られました
package/README.ko.md ADDED
@@ -0,0 +1,256 @@
1
+ # 🛡️ Telegram 그룹 배지 생성기
2
+
3
+ [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md) | [🇹🇭 ไทย](README.th.md) | [🇸🇦 العربية](README.ar.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md)
4
+
5
+ [![Build Status](https://github.com/chatman-media/telegram-badge/workflows/CI/badge.svg)](https://github.com/chatman-media/telegram-badge/actions)
6
+ [![npm version](https://img.shields.io/npm/v/telegram-badge.svg)](https://www.npmjs.com/package/telegram-badge)
7
+ [![npm bundle size](https://img.shields.io/bundlephobia/minzip/telegram-badge)](https://bundlephobia.com/package/telegram-badge)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg)](https://www.typescriptlang.org/)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+
11
+ [![GitHub stars](https://img.shields.io/github/stars/chatman-media/telegram-badge?style=social)](https://github.com/chatman-media/telegram-badge)
12
+ [![dev.to](https://img.shields.io/badge/dev.to-Article-0A0A0A.svg?style=flat&logo=dev.to)](https://dev.to/chatman-media/show-your-telegram-group-member-count-in-github-readme-46pl)
13
+ [![X (Twitter)](https://img.shields.io/badge/Tweet-1DA1F2.svg?style=flat&logo=x&logoColor=white)](https://x.com/chatman_media/status/1947399700795244694)
14
+
15
+ 이 프로젝트는 Telegram 그룹의 현재 멤버 수를 표시하는 SVG 배지를 생성합니다. GitHub README 파일이나 웹사이트에서 커뮤니티 활동을 표시하는 데 완벽합니다.
16
+
17
+ ## 🚀 빠른 시작
18
+
19
+ URL 매개변수를 사용하여 모든 Telegram 채널이나 그룹에 대한 배지를 생성하기만 하면 됩니다:
20
+
21
+ ```
22
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
23
+ ```
24
+
25
+ ![Telegram Group Members](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat)
26
+
27
+ ---
28
+
29
+ ## 📦 기술 스택
30
+
31
+ - Node.js / TypeScript
32
+ - Telegram Bot API
33
+ - Vercel (서버리스 API)
34
+ - Jest (테스트용)
35
+
36
+ ---
37
+
38
+ ## 🧩 사용법
39
+
40
+ ### 주요 방법: URL 매개변수 (설정 불필요!)
41
+
42
+ Telegram 채널/그룹 ID를 URL에 추가하기만 하면 됩니다:
43
+
44
+ ```markdown
45
+ ![Telegram Badge](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel)
46
+ ```
47
+
48
+ 그게 다입니다! 배포도, 봇 토큰도 필요 없습니다.
49
+
50
+ ### 대체 방법: 자체 호스팅
51
+
52
+ 자신만의 인스턴스를 호스팅하려는 고급 사용자를 위한:
53
+
54
+ #### 1. 필수 조건
55
+ - Telegram 봇 토큰 ([@BotFather](https://t.me/botfather)를 통해 생성)
56
+ - Vercel 계정 (또는 모든 Node.js 호스팅)
57
+
58
+ #### 2. Vercel에 배포
59
+
60
+ [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fchatman-media%2Ftelegram-badge)
61
+
62
+ 환경 변수 설정:
63
+ - `BOT_TOKEN`: Telegram 봇 토큰
64
+ - `CHAT_ID`: 기본 채팅 ID (URL 매개변수를 사용하는 경우 선택 사항)
65
+
66
+ #### 3. 로컬 개발
67
+
68
+ ```bash
69
+ git clone https://github.com/chatman-media/telegram-badge.git
70
+ cd telegram-badge
71
+ npm install
72
+
73
+ # .env 파일 생성
74
+ echo "BOT_TOKEN=your_bot_token" > .env
75
+ echo "CHAT_ID=@your_channel" >> .env
76
+
77
+ npm run dev
78
+ ```
79
+
80
+ ### 🎨 스타일링 매개변수
81
+
82
+ 다음 매개변수를 사용하여 배지 외관을 사용자 지정할 수 있습니다:
83
+
84
+ | 매개변수 | 설명 | 기본값 |
85
+ |-----------|-------------|---------------|
86
+ | `channelId` | Telegram 채팅 ID 또는 사용자 이름 (예: `@timelinestudiochat`) | 환경에서 |
87
+ | `style` | 배지 스타일 | `flat` |
88
+ | `label` | 레이블 텍스트 | `Telegram` |
89
+ | `color` | 메인 배지 색상 | `2AABEE` (Telegram 색상) |
90
+ | `labelColor` | 레이블 색상 | `555555` |
91
+ | `logo` | Telegram 로고 표시 | `true` |
92
+
93
+ #### 사용 가능한 스타일:
94
+
95
+ - `flat` - 플랫 스타일 (기본값)
96
+ - `plastic` - 그라데이션이 있는 플라스틱 스타일
97
+ - `flat-square` - 둥근 모서리가 없는 플랫 스타일
98
+ - `for-the-badge` - 대문자가 있는 넓은 스타일
99
+ - `social` - GitHub 소셜 스타일
100
+
101
+ #### 예시:
102
+
103
+ 표준 배지 (플랫 스타일):
104
+ ```
105
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
106
+ ```
107
+ ![Flat](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat)
108
+
109
+ 플라스틱 스타일 배지:
110
+ ```
111
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=plastic
112
+ ```
113
+ ![Plastic](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=plastic)
114
+
115
+ 플랫 스퀘어 스타일 배지:
116
+ ```
117
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=flat-square
118
+ ```
119
+ ![Flat-Square](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=flat-square)
120
+
121
+ for-the-badge 스타일 배지:
122
+ ```
123
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge
124
+ ```
125
+ ![For-The-Badge](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=for-the-badge)
126
+
127
+ 소셜 스타일 배지:
128
+ ```
129
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=social
130
+ ```
131
+ ![Social](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=social)
132
+
133
+ 사용자 지정 레이블과 색상이 있는 배지:
134
+ ```
135
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&label=채팅에%20가입&color=00FF00
136
+ ```
137
+ ![Custom](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&label=채팅에%20가입&color=00FF00)
138
+
139
+ 완전히 맞춤화된 배지:
140
+ ```
141
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&label=커뮤니티&color=FF5733&labelColor=1A1A1A
142
+ ```
143
+ ![Full Custom](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=for-the-badge&label=커뮤니티&color=FF5733&labelColor=1A1A1A)
144
+
145
+ 로고 없는 배지:
146
+ ```
147
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&logo=false
148
+ ```
149
+ ![No Logo](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&logo=false)
150
+
151
+ 특정 채널용 배지:
152
+ ```
153
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
154
+ ```
155
+
156
+ 맞춤 스타일이 있는 배지:
157
+ ```
158
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&color=FF5733
159
+ ```
160
+
161
+ ## ✨ 기능
162
+
163
+ - 👥 실시간 멤버 수 표시
164
+ - 🔗 직접 URL 매개변수 - 설정 불필요!
165
+ - 🎨 배지 외관의 전체 사용자 지정
166
+ - 🔒 안전한 토큰 저장을 통한 선택적 자체 호스팅
167
+ - ⚡ 빠른 로딩을 위한 최적화된 캐싱
168
+ - 🛡️ 정보 메시지가 있는 오류 처리
169
+ - 🆓 무료 사용
170
+ - 📡 활동/메시지 수 표시로 확장 가능
171
+ - 🧪 TypeScript를 통한 포괄적인 테스트 스위트
172
+
173
+ ## 🔧 API 사용
174
+
175
+ ### npm 패키지로:
176
+
177
+ ```bash
178
+ npm install telegram-badge
179
+ ```
180
+
181
+ ```typescript
182
+ import badgeHandler from 'telegram-badge';
183
+
184
+ // 서버리스 함수에서 사용
185
+ export default badgeHandler;
186
+ ```
187
+
188
+ ### 직접 API 호출:
189
+
190
+ ```typescript
191
+ GET /api/telegram-badge?style=flat&label=멤버&color=2AABEE&labelColor=555555
192
+ ```
193
+
194
+ ## 🧪 테스트
195
+
196
+ 테스트 스위트 실행:
197
+
198
+ ```bash
199
+ npm test
200
+ ```
201
+
202
+ ## 🤝 기여
203
+
204
+ 1. 저장소를 포크하세요
205
+ 2. 기능 브랜치를 생성하세요 (`git checkout -b feature/amazing-feature`)
206
+ 3. 변경 사항을 커밋하세요 (`git commit -m 'Add some amazing feature'`)
207
+ 4. 브랜치로 푸시하세요 (`git push origin feature/amazing-feature`)
208
+ 5. Pull Request를 여세요
209
+
210
+ ## 구독
211
+
212
+ [![TikTok](https://img.shields.io/badge/TikTok-000000?style=for-the-badge&logo=tiktok&logoColor=white&labelColor=1c1917)](https://www.tiktok.com/@chatman.media)
213
+ [![twitch](https://img.shields.io/badge/Twitch-9146FF?style=for-the-badge&logo=twitch&logoColor=white&labelColor=1c1917)](https://www.twitch.tv/chatman1984)
214
+ [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white&labelColor=1c1917)](https://www.youtube.com/@chatman-media)
215
+ [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white&labelColor=1c1917)](https://t.me/alexanderkireyev)
216
+ [![X](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white&labelColor=1c1917)](https://x.com/chatman_media)
217
+
218
+ ## 지원 💝🚀
219
+
220
+ - **BTC:** 14s9Y9Rb2CUWHSAatiQMhfkpx1MWXofUzw
221
+ - **TON:** UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
222
+ - **NOT:** UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
223
+ - **ETH:** 0x286D65151b622dCC16624cEd8463FDa45585fd60
224
+
225
+ <div align="center">
226
+ <table>
227
+ <tr>
228
+ <td><img src="public/btc.png" alt="BTC" height="185" /></td>
229
+ <td><img src="public/ton.png" alt="TON" height="185" /></td>
230
+ <td><img src="public/not.png" alt="NOT" height="185" /></td>
231
+ <td><img src="public/eth.png" alt="ETH" height="185" /></td>
232
+ </tr>
233
+ </table>
234
+ </div>
235
+
236
+ ## 스타 기록
237
+
238
+ <a href="https://www.star-history.com/#chatman-media/telegram-badge&Date">
239
+ <picture>
240
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date&theme=dark" />
241
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
242
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
243
+ </picture>
244
+ </a>
245
+
246
+ ## 리포지토리 활동
247
+
248
+ ![Alt](https://repobeats.axiom.co/api/embed/74975e0da934ce1756e69f04fe68f2b026a77aee.svg "Repobeats analytics image")
249
+
250
+ ## 📜 라이선스
251
+
252
+ 이 프로젝트는 MIT 라이선스에 따라 배포됩니다. 자세한 내용은 [LICENSE](LICENSE)를 참조하세요.
253
+
254
+ ---
255
+
256
+ 사랑을 담아 [Chatman Media](https://github.com/chatman-media)가 만들었습니다
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
1
  # 🛡️ Telegram Group Badge Generator
2
2
 
3
- [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md)
3
+ [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md) | [🇹🇭 ไทย](README.th.md) | [🇸🇦 العربية](README.ar.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md)
4
4
 
5
5
  [![Build Status](https://github.com/chatman-media/telegram-badge/workflows/CI/badge.svg)](https://github.com/chatman-media/telegram-badge/actions)
6
- [![npm version](https://badge.fury.io/js/telegram-badge.svg)](https://badge.fury.io/js/telegram-badge)
6
+ [![npm version](https://img.shields.io/npm/v/telegram-badge.svg)](https://www.npmjs.com/package/telegram-badge)
7
7
  [![npm bundle size](https://img.shields.io/bundlephobia/minzip/telegram-badge)](https://bundlephobia.com/package/telegram-badge)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg)](https://www.typescriptlang.org/)
9
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
10
 
11
11
  [![GitHub stars](https://img.shields.io/github/stars/chatman-media/telegram-badge?style=social)](https://github.com/chatman-media/telegram-badge)
12
12
  [![dev.to](https://img.shields.io/badge/dev.to-Article-0A0A0A.svg?style=flat&logo=dev.to)](https://dev.to/chatman-media/show-your-telegram-group-member-count-in-github-readme-46pl)
13
- [![X (Twitter)](https://img.shields.io/badge/Tweet-1DA1F2.svg?style=flat&logo=x&logoColor=white)](https://x.com/status/1947399700795244694)
13
+ [![X (Twitter)](https://img.shields.io/badge/Tweet-1DA1F2.svg?style=flat&logo=x&logoColor=white)](https://x.com/chatman_media/status/1947399700795244694)
14
14
 
15
15
  This project generates SVG badges with the current member count of your Telegram group. Perfect for displaying community activity in GitHub README files or on websites.
16
16
 
@@ -84,7 +84,7 @@ You can customize the badge appearance using the following parameters:
84
84
 
85
85
  | Parameter | Description | Default Value |
86
86
  |-----------|-------------|---------------|
87
- | `channelId` | Telegram chat ID or username (e.g., ``) | From environment |
87
+ | `channelId` | Telegram chat ID or username (e.g., `@your_channel`) | From environment |
88
88
  | `style` | Badge style | `flat` |
89
89
  | `label` | Label text | `Telegram` |
90
90
  | `color` | Main badge color | `2AABEE` (Telegram color) |
@@ -189,7 +189,7 @@ export default badgeHandler;
189
189
  ### Direct API calls:
190
190
 
191
191
  ```typescript
192
- GET /api/telegram-badge?style=flat&label=Members&color=2AABEE&labelColor=555555
192
+ GET /api/telegram-badge?channelId=@your_channel&style=flat&label=Members&color=2AABEE&labelColor=555555
193
193
  ```
194
194
 
195
195
  ## 🧪 Testing
@@ -212,16 +212,6 @@ Build the project:
212
212
  npm run build
213
213
  ```
214
214
 
215
- ## Star History
216
-
217
- <a href="https://www.star-history.com/#chatman-media/telegram-badge&Date">
218
- <picture>
219
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date&theme=dark" />
220
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
221
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
222
- </picture>
223
- </a>
224
-
225
215
  ## 🤝 Contributing
226
216
 
227
217
  1. Fork the repository
@@ -236,7 +226,7 @@ npm run build
236
226
  [![twitch](https://img.shields.io/badge/Twitch-9146FF?style=for-the-badge&logo=twitch&logoColor=white&labelColor=1c1917)](https://www.twitch.tv/chatman1984)
237
227
  [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white&labelColor=1c1917)](https://www.youtube.com/@chatman-media)
238
228
  [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white&labelColor=1c1917)](https://t.me/alexanderkireyev)
239
- [![X](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white&labelColor=1c1917)](https://x.com)
229
+ [![X](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white&labelColor=1c1917)](https://x.com/chatman_media)
240
230
 
241
231
  ## Support 💝🚀
242
232
 
@@ -246,12 +236,30 @@ npm run build
246
236
  - **ETH:** 0x286D65151b622dCC16624cEd8463FDa45585fd60
247
237
 
248
238
  <div align="center">
249
- <img src="public/btc.png" alt="BTC" style="height: 185px" /><br/>
250
- <img src="public/ton.png" alt="TON" style="height: 185px" /><br/>
251
- <img src="public/not.png" alt="NOT" style="height: 185px" /><br/>
252
- <img src="public/eth.png" alt="ETH" style="height: 185px" />
239
+ <table>
240
+ <tr>
241
+ <td><img src="public/btc.png" alt="BTC" height="185" /></td>
242
+ <td><img src="public/ton.png" alt="TON" height="185" /></td>
243
+ <td><img src="public/not.png" alt="NOT" height="185" /></td>
244
+ <td><img src="public/eth.png" alt="ETH" height="185" /></td>
245
+ </tr>
246
+ </table>
253
247
  </div>
254
248
 
249
+ ## Star History
250
+
251
+ <a href="https://www.star-history.com/#chatman-media/telegram-badge&Date">
252
+ <picture>
253
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date&theme=dark" />
254
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
255
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
256
+ </picture>
257
+ </a>
258
+
259
+ ## Repo Activity
260
+
261
+ ![Alt](https://repobeats.axiom.co/api/embed/74975e0da934ce1756e69f04fe68f2b026a77aee.svg "Repobeats analytics image")
262
+
255
263
  ## 📜 License
256
264
 
257
265
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
package/README.ru.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # 🛡️ Telegram Group Badge Generator
2
2
 
3
- [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md)
3
+ [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md) | [🇹🇭 ไทย](README.th.md) | [🇸🇦 العربية](README.ar.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md)
4
4
 
5
5
  [![Build Status](https://github.com/chatman-media/telegram-badge/workflows/CI/badge.svg)](https://github.com/chatman-media/telegram-badge/actions)
6
- [![npm version](https://badge.fury.io/js/telegram-badge.svg)](https://badge.fury.io/js/telegram-badge)
6
+ [![npm version](https://img.shields.io/npm/v/telegram-badge.svg)](https://www.npmjs.com/package/telegram-badge)
7
7
  [![npm bundle size](https://img.shields.io/bundlephobia/minzip/telegram-badge)](https://bundlephobia.com/package/telegram-badge)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg)](https://www.typescriptlang.org/)
9
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -235,7 +235,7 @@ npm run build
235
235
  [![twitch](https://img.shields.io/badge/Twitch-9146FF?style=for-the-badge&logo=twitch&logoColor=white&labelColor=1c1917)](https://www.twitch.tv/chatman1984)
236
236
  [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white&labelColor=1c1917)](https://www.youtube.com/@chatman-media)
237
237
  [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white&labelColor=1c1917)](https://t.me/alexanderkireyev)
238
- [![X](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white&labelColor=1c1917)](https://x.com/timelinestudiochat)
238
+ [![X](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white&labelColor=1c1917)](https://x.com/chatman_media)
239
239
 
240
240
  ## Поддержка 💝🚀
241
241
 
@@ -245,13 +245,19 @@ npm run build
245
245
  - **ETH:** 0x286D65151b622dCC16624cEd8463FDa45585fd60
246
246
 
247
247
  <div align="center">
248
+ <table>
249
+ <tr>
250
+ <td><img src="public/btc.png" alt="BTC" height="185" /></td>
251
+ <td><img src="public/ton.png" alt="TON" height="185" /></td>
252
+ <td><img src="public/not.png" alt="NOT" height="185" /></td>
253
+ <td><img src="public/eth.png" alt="ETH" height="185" /></td>
254
+ </tr>
255
+ </table>
256
+ </div>
248
257
 
249
- <img src="public/btc.png" alt="BTC" style="height: 185px" />
250
- <img src="public/ton.png" alt="TON" style="height: 185px" />
251
- <img src="public/not.png" alt="NOT" style="height: 185px" />
252
- <img src="public/eth.png" alt="ETH" style="height: 185px" />
258
+ ## Активность репозитория
253
259
 
254
- </div>
260
+ ![Alt](https://repobeats.axiom.co/api/embed/74975e0da934ce1756e69f04fe68f2b026a77aee.svg "Repobeats analytics image")
255
261
 
256
262
  ## 📜 Лицензия
257
263
 
package/README.th.md ADDED
@@ -0,0 +1,268 @@
1
+ # 🛡️ Telegram Group Badge Generator
2
+
3
+ [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md) | [🇹🇭 ไทย](README.th.md) | [🇸🇦 العربية](README.ar.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md)
4
+
5
+ [![Build Status](https://github.com/chatman-media/telegram-badge/workflows/CI/badge.svg)](https://github.com/chatman-media/telegram-badge/actions)
6
+ [![npm version](https://img.shields.io/npm/v/telegram-badge.svg)](https://www.npmjs.com/package/telegram-badge)
7
+ [![npm bundle size](https://img.shields.io/bundlephobia/minzip/telegram-badge)](https://bundlephobia.com/package/telegram-badge)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg)](https://www.typescriptlang.org/)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+
11
+ [![GitHub stars](https://img.shields.io/github/stars/chatman-media/telegram-badge?style=social)](https://github.com/chatman-media/telegram-badge)
12
+ [![dev.to](https://img.shields.io/badge/dev.to-Article-0A0A0A.svg?style=flat&logo=dev.to)](https://dev.to/chatman-media/show-your-telegram-group-member-count-in-github-readme-46pl)
13
+ [![X (Twitter)](https://img.shields.io/badge/Tweet-1DA1F2.svg?style=flat&logo=x&logoColor=white)](https://x.com/chatman_media/status/1947399700795244694)
14
+
15
+ โปรเจ็กต์นี้สร้างป้าย SVG ที่แสดงจำนวนสมาชิกปัจจุบันของกลุ่ม Telegram ของคุณ เหมาะอย่างยิ่งสำหรับแสดงความคล่องแคล่วของชุมชนในไฟล์ README ของ GitHub หรือบนเว็บไซต์
16
+
17
+ ## 🚀 เริ่มต้นอย่างรวดเร็ว
18
+
19
+ เพียงใช้พารามิเตอร์ URL เพื่อสร้างป้ายสำหรับช่องหรือกลุ่ม Telegram ใดๆ:
20
+
21
+ ```
22
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
23
+ ```
24
+
25
+ ![Telegram Group Members](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat)
26
+
27
+ ---
28
+
29
+ ## 📦 เทคโนโลยีที่ใช้
30
+
31
+ - Node.js / TypeScript
32
+ - Telegram Bot API
33
+ - Vercel (Serverless API)
34
+ - Jest สำหรับการทดสอบ
35
+
36
+ ---
37
+
38
+ ## 🧩 วิธีใช้งาน
39
+
40
+ ### วิธีหลัก: พารามิเตอร์ URL (ไม่ต้องตั้งค่า!)
41
+
42
+ เพียงเพิ่ม ID ช่อง/กลุ่ม Telegram ของคุณไปยัง URL:
43
+
44
+ ```markdown
45
+ ![Telegram Badge](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel)
46
+ ```
47
+
48
+ เพียงเท่านี้! ไม่ต้อง deploy ไม่ต้องใช้โทเค็นบอท
49
+
50
+ ### วิธีทางเลือก: โฮสต์ด้วยตนเอง
51
+
52
+ สำหรับผู้ใช้ขั้นสูงที่ต้องการโฮสต์อินสแตนซ์ของตนเอง:
53
+
54
+ #### 1. ข้อกำหนดเบื้องต้น
55
+ - โทเค็นบอท Telegram (สร้างผ่าน [@BotFather](https://t.me/botfather))
56
+ - บัญชี Vercel (หรือโฮสติ้ง Node.js ใดๆ)
57
+
58
+ #### 2. Deploy ไปยัง Vercel
59
+
60
+ [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fchatman-media%2Ftelegram-badge)
61
+
62
+ ตั้งค่าตัวแปรสภาพแวดล้อม:
63
+ - `BOT_TOKEN`: โทเค็นบอท Telegram ของคุณ
64
+ - `CHAT_ID`: ID แชทเริ่มต้น (ไม่จำเป็นหากใช้พารามิเตอร์ URL)
65
+
66
+ #### 3. การพัฒนาในเครื่อง
67
+
68
+ ```bash
69
+ git clone https://github.com/chatman-media/telegram-badge.git
70
+ cd telegram-badge
71
+ npm install
72
+
73
+ # สร้างไฟล์ .env
74
+ echo "BOT_TOKEN=your_bot_token" > .env
75
+ echo "CHAT_ID=@your_channel" >> .env
76
+
77
+ npm run dev
78
+ ```
79
+
80
+ ### 🎨 พารามิเตอร์การปรับแต่ง
81
+
82
+ คุณสามารถปรับแต่งรูปลักษณ์ของป้ายได้โดยใช้พารามิเตอร์ต่อไปนี้:
83
+
84
+ | พารามิเตอร์ | คำอธิบาย | ค่าเริ่มต้น |
85
+ |-----------|-------------|---------------|
86
+ | `channelId` | ID หรือชื่อผู้ใช้ของแชท Telegram (เช่น `@timelinestudiochat`) | จากสภาพแวดล้อม |
87
+ | `style` | รูปแบบป้าย | `flat` |
88
+ | `label` | ข้อความป้ายกำกับ | `Telegram` |
89
+ | `color` | สีป้ายหลัก | `2AABEE` (สี Telegram) |
90
+ | `labelColor` | สีป้ายกำกับ | `555555` |
91
+ | `logo` | แสดงโลโก้ Telegram | `true` |
92
+
93
+ #### รูปแบบที่ใช้ได้:
94
+
95
+ - `flat` - รูปแบบเรียบ (เริ่มต้น)
96
+ - `plastic` - รูปแบบพลาสติกกับไล่ระดับสี
97
+ - `flat-square` - รูปแบบเรียบเหลี่ยมไม่มีมุมมน
98
+ - `for-the-badge` - รูปแบบกว้างกับตัวพิมพ์ใหญ่
99
+ - `social` - รูปแบบโซเชียลของ GitHub
100
+
101
+ #### ตัวอย่าง:
102
+
103
+ ป้ายมาตรฐาน (รูปแบบ flat):
104
+ ```
105
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
106
+ ```
107
+ ![Flat](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat)
108
+
109
+ ป้ายกับรูปแบบ plastic:
110
+ ```
111
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=plastic
112
+ ```
113
+ ![Plastic](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=plastic)
114
+
115
+ ป้ายกับรูปแบบ flat-square:
116
+ ```
117
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=flat-square
118
+ ```
119
+ ![Flat-Square](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=flat-square)
120
+
121
+ ป้ายกับรูปแบบ for-the-badge:
122
+ ```
123
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge
124
+ ```
125
+ ![For-The-Badge](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=for-the-badge)
126
+
127
+ ป้ายกับรูปแบบ social:
128
+ ```
129
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=social
130
+ ```
131
+ ![Social](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=social)
132
+
133
+ ป้ายกับป้ายกำกับและสีที่กำหนดเอง:
134
+ ```
135
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&label=เข้าร่วมแชท&color=00FF00
136
+ ```
137
+ ![Custom](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&label=เข้าร่วมแชท&color=00FF00)
138
+
139
+ ป้ายที่ปรับแต่งเต็มรูปแบบ:
140
+ ```
141
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&label=ชุมชน&color=FF5733&labelColor=1A1A1A
142
+ ```
143
+ ![Full Custom](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&style=for-the-badge&label=ชุมชน&color=FF5733&labelColor=1A1A1A)
144
+
145
+ ป้ายไม่มีโลโก้:
146
+ ```
147
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&logo=false
148
+ ```
149
+ ![No Logo](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@timelinestudiochat&logo=false)
150
+
151
+ ป้ายสำหรับช่องเฉพาะ:
152
+ ```
153
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel
154
+ ```
155
+
156
+ ป้ายกับการปรับแต่งที่กำหนดเอง:
157
+ ```
158
+ https://telegram-badge.vercel.app/api/telegram-badge?channelId=@your_channel&style=for-the-badge&color=FF5733
159
+ ```
160
+
161
+ ## ✨ คุณสมบัติ
162
+
163
+ - 👥 แสดงจำนวนสมาชิกแบบเรียลไทม์
164
+ - 🔗 พารามิเตอร์ URL โดยตรง - ไม่ต้องตั้งค่า!
165
+ - 🎨 ปรับแต่งรูปลักษณ์ป้ายได้เต็มรูปแบบ
166
+ - 🔒 โฮสต์ด้วยตนเองแบบเลือกได้กับการจัดเก็บโทเค็นอย่างปลอดภัย
167
+ - ⚡ แคชที่ปรับปรุงแล้วสำหรับการโหลดที่รวดเร็ว
168
+ - 🛡️ การจัดการข้อผิดพลาดกับข้อความที่ให้ข้อมูล
169
+ - 🆓 ใช้งานฟรี
170
+ - 📡 สามารถขยายเพื่อแสดงกิจกรรม/จำนวนข้อความ
171
+ - 🧪 ชุดทดสอบที่ครอบคลุมกับ TypeScript
172
+
173
+ ## 🔧 การใช้งาน API
174
+
175
+ ### เป็นแพ็คเกจ npm:
176
+
177
+ ```bash
178
+ npm install telegram-badge
179
+ ```
180
+
181
+ ```typescript
182
+ import badgeHandler from 'telegram-badge';
183
+
184
+ // ใช้ในเซิร์ฟเวอร์เลสฟังก์ชันของคุณ
185
+ export default badgeHandler;
186
+ ```
187
+
188
+ ### การเรียก API โดยตรง:
189
+
190
+ ```typescript
191
+ GET /api/telegram-badge?style=flat&label=สมาชิก&color=2AABEE&labelColor=555555
192
+ ```
193
+
194
+ ## 🧪 การทดสอบ
195
+
196
+ รันแพ็คเกจทดสอบ:
197
+
198
+ ```bash
199
+ npm test
200
+ ```
201
+
202
+ รันการตรวจสอบประเภท:
203
+
204
+ ```bash
205
+ npm run type-check
206
+ ```
207
+
208
+ สร้างโปรเจ็กต์:
209
+
210
+ ```bash
211
+ npm run build
212
+ ```
213
+
214
+ ## 🤝 การมีส่วนร่วม
215
+
216
+ 1. Fork รีพอซิทอรี
217
+ 2. สร้าง branch ฟีเจอร์ของคุณ (`git checkout -b feature/amazing-feature`)
218
+ 3. Commit การเปลี่ยนแปลงของคุณ (`git commit -m 'Add some amazing feature'`)
219
+ 4. Push ไปยัง branch (`git push origin feature/amazing-feature`)
220
+ 5. เปิด Pull Request
221
+
222
+ ## ติดตาม
223
+
224
+ [![TikTok](https://img.shields.io/badge/TikTok-000000?style=for-the-badge&logo=tiktok&logoColor=white&labelColor=1c1917)](https://www.tiktok.com/@chatman.media)
225
+ [![twitch](https://img.shields.io/badge/Twitch-9146FF?style=for-the-badge&logo=twitch&logoColor=white&labelColor=1c1917)](https://www.twitch.tv/chatman1984)
226
+ [![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white&labelColor=1c1917)](https://www.youtube.com/@chatman-media)
227
+ [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white&labelColor=1c1917)](https://t.me/alexanderkireyev)
228
+ [![X (Twitter)](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white&labelColor=1c1917)](https://x.com/chatman_media)
229
+
230
+ ## สนับสนุน 💝🚀
231
+
232
+ - **BTC:** 14s9Y9Rb2CUWHSAatiQMhfkpx1MWXofUzw
233
+ - **TON:** UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
234
+ - **NOT:** UQD1M80nPyzph5ZW1vfp_r19XI5MaerNhDq4dWXbXCo96WFj
235
+ - **ETH:** 0x286D65151b622dCC16624cEd8463FDa45585fd60
236
+
237
+ <div align="center">
238
+ <table>
239
+ <tr>
240
+ <td><img src="public/btc.png" alt="BTC" height="185" /></td>
241
+ <td><img src="public/ton.png" alt="TON" height="185" /></td>
242
+ <td><img src="public/not.png" alt="NOT" height="185" /></td>
243
+ <td><img src="public/eth.png" alt="ETH" height="185" /></td>
244
+ </tr>
245
+ </table>
246
+ </div>
247
+
248
+ ## ประวัติดาว
249
+
250
+ <a href="https://www.star-history.com/#chatman-media/telegram-badge&Date">
251
+ <picture>
252
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date&theme=dark" />
253
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
254
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=chatman-media/telegram-badge&type=Date" />
255
+ </picture>
256
+ </a>
257
+
258
+ ## กิจกรรมรีพอซิทอรี
259
+
260
+ ![Alt](https://repobeats.axiom.co/api/embed/74975e0da934ce1756e69f04fe68f2b026a77aee.svg "Repobeats analytics image")
261
+
262
+ ## 📜 ใบอนุญาต
263
+
264
+ โปรเจ็กต์นี้ได้รับอนุญาตภายใต้ใบอนุญาต MIT - ดูไฟล์ [LICENSE](LICENSE) สำหรับรายละเอียด
265
+
266
+ ---
267
+
268
+ สร้างด้วย ❤️ โดย [Chatman Media](https://github.com/chatman-media)
package/README.zh.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # 🛡️ Telegram 群组徽章生成器
2
2
 
3
- [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md)
3
+ [🇷🇺 Русский](README.ru.md) | [🇺🇸 English](README.md) | [🇨🇳 中文](README.zh.md) | [🇹🇭 ไทย](README.th.md) | [🇸🇦 العربية](README.ar.md) | [🇯🇵 日本語](README.ja.md) | [🇰🇷 한국어](README.ko.md)
4
4
 
5
5
  [![构建状态](https://github.com/chatman-media/telegram-badge/workflows/CI/badge.svg)](https://github.com/chatman-media/telegram-badge/actions)
6
- [![npm 版本](https://badge.fury.io/js/telegram-badge.svg)](https://badge.fury.io/js/telegram-badge)
6
+ [![npm 版本](https://img.shields.io/npm/v/telegram-badge.svg)](https://www.npmjs.com/package/telegram-badge)
7
7
  [![npm 包大小](https://img.shields.io/bundlephobia/minzip/telegram-badge)](https://bundlephobia.com/package/telegram-badge)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue.svg)](https://www.typescriptlang.org/)
9
9
  [![许可证: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -246,13 +246,19 @@ npm run build
246
246
  - **ETH:** 0x286D65151b622dCC16624cEd8463FDa45585fd60
247
247
 
248
248
  <div align="center">
249
+ <table>
250
+ <tr>
251
+ <td><img src="public/btc.png" alt="BTC" height="185" /></td>
252
+ <td><img src="public/ton.png" alt="TON" height="185" /></td>
253
+ <td><img src="public/not.png" alt="NOT" height="185" /></td>
254
+ <td><img src="public/eth.png" alt="ETH" height="185" /></td>
255
+ </tr>
256
+ </table>
257
+ </div>
249
258
 
250
- <img src="public/btc.png" alt="BTC" style="height: 185px" />
251
- <img src="public/ton.png" alt="TON" style="height: 185px" />
252
- <img src="public/not.png" alt="NOT" style="height: 185px" />
253
- <img src="public/eth.png" alt="ETH" style="height: 185px" />
259
+ ## 仓库活动
254
260
 
255
- </div>
261
+ ![Alt](https://repobeats.axiom.co/api/embed/74975e0da934ce1756e69f04fe68f2b026a77aee.svg "Repobeats analytics image")
256
262
 
257
263
  ## 📜 许可证
258
264
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telegram-badge",
3
- "version": "1.2.3",
3
+ "version": "1.3.0",
4
4
  "description": "Generate Telegram group member count badges for GitHub README",
5
5
  "keywords": [
6
6
  "telegram",
@@ -37,17 +37,22 @@
37
37
  "build:local": "tsc",
38
38
  "type-check": "tsc --noEmit",
39
39
  "prepublishOnly": "npm run build:local && npm test",
40
- "prepack": "npm run build:local"
40
+ "prepack": "npm run build:local",
41
+ "release": "semantic-release"
41
42
  },
42
43
  "devDependencies": {
43
- "@types/jest": "^29.5.14",
44
- "@types/node": "^24.0.15",
45
- "@vercel/node": "^2.3.0",
46
- "dotenv": "^17.2.0",
47
- "jest": "^30.0.4",
48
- "node-fetch": "^2.7.0",
49
- "ts-jest": "^29.4.0",
44
+ "@semantic-release/changelog": "^6.0.3",
45
+ "@semantic-release/git": "^10.0.1",
46
+ "@semantic-release/github": "^11.0.6",
47
+ "@types/jest": "30.0.0",
48
+ "@types/node": "^24.5.2",
49
+ "@vercel/node": "5.3.23",
50
+ "dotenv": "^17.2.2",
51
+ "jest": "^30.1.3",
52
+ "node-fetch": "3.3.2",
53
+ "semantic-release": "^24.2.9",
54
+ "ts-jest": "^29.4.4",
50
55
  "ts-node": "^10.9.2",
51
- "typescript": "^5.8.3"
56
+ "typescript": "^5.9.2"
52
57
  }
53
58
  }