Skip to content

Commit 67c69b5

Browse files
committed
update worker/src/worker.js
1 parent 8ac67f5 commit 67c69b5

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

worker/src/worker.js

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,25 @@ async function handleBotCommand(request, env) {
111111
}
112112

113113
async function handleStartCommand(BOT_TOKEN, chatId) {
114-
const message = `🎬 <b>Welcome to IMDB-TG-POST Bot!</b> 🎬\n\nI help you post new content updates to your channel. Use /help to see available commands and setup instructions.`;
115-
114+
const message = `
115+
<blockquote expandable>🎬 <b>Welcome to IMDB-TG-POST Bot!</b> 🎬
116+
Your personal assistant to post the latest movie & series updates to your Telegram channels and groups.
117+
118+
🛠️ <b>Getting Started:</b>
119+
Follow these simple steps to set things up:
120+
121+
1️⃣ <b>Add your channel or group</b>
122+
2️⃣ <b>Make the bot an admin</b>
123+
3️⃣ 🔧 Go to the website and tap the ⚙️
124+
4️⃣ ➕ Add your <b>channel/group ID</b>, then save
125+
5️⃣ ✅ <b>Setup complete!</b>
126+
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.
129+
130+
🎉 <b>Happy posting!</b></blockquote>
131+
`.trim();
132+
116133
const buttons = [
117134
[
118135
{
@@ -126,8 +143,13 @@ async function handleStartCommand(BOT_TOKEN, chatId) {
126143
]
127144
];
128145

129-
await sendTextMessage(BOT_TOKEN, chatId, message, buttons);
130-
return new Response('OK');
146+
try {
147+
await sendTextMessage(BOT_TOKEN, chatId, message, buttons);
148+
return new Response('OK', { status: 200 });
149+
} catch (error) {
150+
console.error(`Failed to send start message to ${chatId}:`, error);
151+
return new Response('Internal Server Error', { status: 500 });
152+
}
131153
}
132154

133155
async function handleHelpCommand(BOT_TOKEN, chatId) {

0 commit comments

Comments
 (0)