@goodnesshq/opencode-notification 0.2.0 → 0.2.1
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/.opencode/notify-init.mjs +10 -3
- package/package.json +1 -1
|
@@ -587,10 +587,17 @@ async function main() {
|
|
|
587
587
|
const tokenInput = interactive
|
|
588
588
|
? await promptInput("Telegram bot token: ")
|
|
589
589
|
: await rl.question("Telegram bot token: ");
|
|
590
|
-
const chatIdInput = interactive
|
|
591
|
-
? await promptInput("Telegram chat ID (see docs/telegram-chat-id.md): ")
|
|
592
|
-
: await rl.question("Telegram chat ID (see docs/telegram-chat-id.md): ");
|
|
593
590
|
telegramToken = tokenInput.trim();
|
|
591
|
+
if (telegramToken) {
|
|
592
|
+
const updatesUrl = `https://api.telegram.org/bot${telegramToken}/getUpdates`;
|
|
593
|
+
console.log("\nFind your Telegram chat ID:");
|
|
594
|
+
console.log(" 1) Send your bot a message in Telegram.");
|
|
595
|
+
console.log(` 2) Open ${updatesUrl} in a browser.`);
|
|
596
|
+
console.log(" 3) Use message.chat.id (or channel_post.chat.id for channels).\n");
|
|
597
|
+
}
|
|
598
|
+
const chatIdInput = interactive
|
|
599
|
+
? await promptInput("Telegram chat ID: ")
|
|
600
|
+
: await rl.question("Telegram chat ID: ");
|
|
594
601
|
telegramChatId = chatIdInput.trim();
|
|
595
602
|
}
|
|
596
603
|
|