Skip to content

Commit 5e2c012

Browse files
committed
update worker/src/worker.js
1 parent 13a5a2d commit 5e2c012

File tree

1 file changed

+41
-28
lines changed

1 file changed

+41
-28
lines changed

β€Žworker/src/worker.jsβ€Ž

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,9 @@ Follow these simple steps to set things up:
124124
4️⃣ βž• Add your <b>channel/group ID</b>, then save
125125
5️⃣ βœ… <b>Setup complete!</b>
126126
6️⃣ πŸ” Now you can <b>search and post</b> β€” test it out and see the bot in action!
127-
128-
πŸ“Œ Use the <code>/help</code> command to view all features and commands.
129127
</blockquote>
130128
131-
<b><i>Example Post Preview:</i></b>
132-
<pre>&lt;blockquote&gt;
133-
&lt;b&gt;πŸ“Œ JOIN NOW! πŸ‘‰ &lt;/b&gt;&lt;a href="https://t.me/flixora_site"&gt; πŸ—¨οΈFlixora_site πŸ—¨οΈ&lt;/a&gt;
134-
&lt;i&gt;πŸ“’ ALL NEW SERIES &amp; MOVIES πŸ”Ž &lt;/i&gt;
135-
&lt;tg-spoiler&gt;🌐Visit πŸ‘‰ &lt;a href="https://toxybox99.eu.org"&gt; FLIXORA πŸ’Š&lt;/a&gt;&lt;/tg-spoiler&gt;
136-
&lt;/blockquote&gt;</pre>
137-
129+
πŸ“Œ Use the <code>/help</code> command to view all features and commands.
138130
πŸŽ‰ <b>Happy posting!</b>
139131
`.trim();
140132

@@ -161,32 +153,53 @@ Follow these simple steps to set things up:
161153
}
162154

163155
async function handleHelpCommand(BOT_TOKEN, chatId) {
164-
const message = `πŸ€– <b>Bot Help Center</b>\n\nHere are the available commands:\n\n` +
165-
`β€’ /start - Welcome IMDB-TG-POST\n` +
166-
`β€’ /help - Show this help message\n\n` +
167-
`<b>How to use:</b>\n` +
168-
`1. Add me to your channel as admin\n` +
169-
`2. Go to site & explore\n` +
170-
`3. Add your channel ID form the top setting botton\n\n` +
171-
`4. save and use your imdb and link share to Telegram channel:`;
172-
156+
const message = `
157+
πŸ€– <b>Bot Help Center</b>
158+
159+
πŸ” <b>Available Commands:</b>
160+
β€’ /start - Welcome message and setup guide
161+
β€’ /help - Show this help message
162+
β€’ /setup - Configure your channel settings
163+
β€’ /post - Create a new content post
164+
β€’ /search - Find movies/series to share
165+
166+
πŸ“ <b>How to Use:</b>
167+
1. <b>Add me to your channel</b> as admin with post permissions
168+
2. <b>Go to our website</b> and explore the features
169+
3. Tap the <b>settings button (βš™οΈ)</b> to configure
170+
4. <b>Add your channel ID</b> and save your configuration
171+
5. Use <b>/search</b> to find content and post directly to your channel
172+
173+
πŸ’‘<b><i>Example Post Preview:</i></b>
174+
175+
<pre>&lt;blockquote&gt;
176+
&lt;b&gt;πŸ“Œ JOIN NOW! πŸ‘‰ &lt;/b&gt;&lt;a href="https://t.me/flixora_site"&gt; πŸ—¨οΈFlixora_site πŸ—¨οΈ&lt;/a&gt;
177+
&lt;i&gt;πŸ“’ ALL NEW SERIES &amp; MOVIES πŸ”Ž &lt;/i&gt;
178+
&lt;tg-spoiler&gt;🌐Visit πŸ‘‰ &lt;a href="https://toxybox99.eu.org"&gt; FLIXORA πŸ’Š&lt;/a&gt;&lt;/tg-spoiler&gt;
179+
&lt;/blockquote&gt;</pre>
180+
`.trim();
181+
173182
const buttons = [
174183
[
175-
{ text: "πŸ“š Owner",
176-
url: "https://t.me/SLtharindu1" },
177-
{ text: "πŸŽ₯ Tutorial",
178-
url: "https://example.com/tutorial" }
184+
{ text: "πŸ‘€ Owner", url: "https://t.me/SLtharindu1" },
185+
{ text: "πŸŽ₯ Tutorial", url: "https://example.com/tutorial" }
179186
],
180187
[
181-
{ text: "❓ Support",
182-
url: "https://t.me/SLtharindu1" },
183-
{ text: "πŸ› Report Issue",
184-
url: "https://t.me/SLtharindu1" }
188+
{ text: "πŸ†˜ Support", url: "https://t.me/SLtharindu1" },
189+
{ text: "πŸ› Report Issue", url: "https://t.me/SLtharindu1" }
190+
],
191+
[
192+
{ text: "🌐 Visit Website", url: "https://imdb-tg-post-font.pages.dev" }
185193
]
186194
];
187195

188-
await sendTextMessage(BOT_TOKEN, chatId, message, buttons);
189-
return new Response('OK');
196+
try {
197+
await sendTextMessage(BOT_TOKEN, chatId, message, buttons);
198+
return new Response('OK', { status: 200 });
199+
} catch (error) {
200+
console.error(`Failed to send help message to ${chatId}:`, error);
201+
return new Response('Internal Server Error', { status: 500 });
202+
}
190203
}
191204

192205
async function sendToTelegram(payload, env) {

0 commit comments

Comments
Β (0)