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:
shiqocred
2025-01-12 00:55:31 +07:00
committed by GitHub
parent 9db979e43f
commit dd3618bfd9
8 changed files with 68 additions and 44 deletions

View File

@@ -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) {