1
import { Telegram as Telegraf } from "[email protected]";
2
/**
3
* @param photo The path or URL to the image.
4
*/
5
type Telegram = {
6
token: string;
7
};
8
export async function main(
9
auth: Telegram,
10
chat_id: string | number,
11
photo: string,
12
reply_to_message_id?: number,
13
) {
14
const client = new Telegraf(auth.token);
15
return await client.sendPhoto(chat_id, photo, {
16
reply_to_message_id,
17
});
18
}
19
import { Telegram } from "npm:[email protected]";
const client = new Telegram(auth.token);