mirror of
https://github.com/zhigang1992/telert.git
synced 2026-01-12 08:24:41 +08:00
feat: add document
This commit is contained in:
14
src/index.ts
14
src/index.ts
@@ -76,7 +76,19 @@ async function processUpdate(update: Update): Promise<void> {
|
||||
await TG_GROUPS.put(`webhook-chat:${result}`, chatId.toString());
|
||||
webhookUrl = `${WEBHOOK_PREFIX}/t/${result}`;
|
||||
}
|
||||
await sendToChat(chatId, webhookUrl);
|
||||
await sendToChat(chatId, `<a href="${webhookUrl}>${webhookUrl}</a>
|
||||
|
||||
<code>
|
||||
{
|
||||
"topic": "WebApp",
|
||||
"event": "New User Registered",
|
||||
"emoji": "👋",
|
||||
"metadata": {
|
||||
"email": "test@example.com"
|
||||
}
|
||||
}
|
||||
</code>
|
||||
`, 'HTML');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user