-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdeeplinkWelcome.js
More file actions
32 lines (28 loc) · 1.36 KB
/
Copy pathdeeplinkWelcome.js
File metadata and controls
32 lines (28 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const path = require('path');
const { withTyping } = require('./utils'); // Import the withTyping function
async function sendDeepLinkWelcome(chatId, projectName, bot, mainKeyboard) {
const projectIntroPath = path.join(__dirname, 'assets', 'projectintro.jpg');
// Send preliminary text message
await withTyping(chatId, async () => {
await bot.sendMessage(
chatId,
`Powering up Myros Agent, tailored for *${projectName}*...\n\nThis might take a moment, but good things are worth the wait!`,
{ parse_mode: 'Markdown', reply_markup: mainKeyboard }
);
});
// Then, send the welcome photo with intro message
await withTyping(chatId, async () => {
await bot.sendPhoto(chatId, projectIntroPath, {
caption:
`Welcome to Myros Agent (Beta), tailored for *${projectName}*!\n\n` +
`⚡ *Quick Tips:* \n` +
`✅ Missing buttons? Tap the icon near the chat box to reveal them.\n` +
`✅ Admin access? Tap *For Admin* to manage my knowledge on *${projectName}*.\n\n` +
`💬 Feel free to ask me anything about *${projectName}*.\n\n` +
`🧠 *Curious how I work?* [Learn More](https://myros.gitbook.io/bp), or build me yourself with [Myros](https://github.com/MyrosResearch/Myros)!`,
parse_mode: 'Markdown',
reply_markup: mainKeyboard,
});
});
}
module.exports = { sendDeepLinkWelcome };