This commit is contained in:
KienVT9 2025-07-16 15:37:26 +07:00
parent 9cde60bb9c
commit c35d84cf07
11 changed files with 2109 additions and 68 deletions

View file

@ -1,4 +1,5 @@
import { Client } from '@larksuiteoapi/node-sdk';
import TelegramBot from 'node-telegram-bot-api';
export async function sendLarkMessage(receiveId: string, message: string): Promise<any> {
console.log(process.env.LARK_APP_ID!, process.env.LARK_APP_SECRET!);
@ -19,4 +20,9 @@ export async function sendLarkMessage(receiveId: string, message: string): Promi
});
return { success: true, data: res.data };
}
}
export function sendTelegramMessage(chatId: string, message: string) {
const bot = new TelegramBot(process.env.TELEGRAM_BOT_TOKEN!);
bot.sendMessage(chatId, message);
}