mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Add inline button telegram (#3)
* Update utils.ts add type inline button * Update dokploy-restart.ts fixing format massage and adding [] for inline button type * Update docker-cleanup.ts fixing telegram message * Update database-backup.ts fixing telegram message * Update build-error.ts fixing message and adding button logs view * Update build-success.ts fixing message, adding domains props, adding inline button * Update compose.ts adding get domains compose and send to notif * Update application.ts adding get domains and send it to notif
This commit is contained in:
@@ -55,6 +55,10 @@ export const sendDiscordNotification = async (
|
||||
export const sendTelegramNotification = async (
|
||||
connection: typeof telegram.$inferInsert,
|
||||
messageText: string,
|
||||
inlineButton: {
|
||||
text: string;
|
||||
url: string;
|
||||
}[][]
|
||||
) => {
|
||||
try {
|
||||
const url = `https://api.telegram.org/bot${connection.botToken}/sendMessage`;
|
||||
@@ -66,6 +70,9 @@ export const sendTelegramNotification = async (
|
||||
text: messageText,
|
||||
parse_mode: "HTML",
|
||||
disable_web_page_preview: true,
|
||||
reply_markup: {
|
||||
inline_keyboard: inlineButton,
|
||||
},
|
||||
}),
|
||||
});
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user